reset highlighting of references if object is being deleted, fix crash with invalid sub-element names

This commit is contained in:
wmayer
2017-04-24 19:18:58 +02:00
parent 2cfb029fe5
commit fa50729aeb
6 changed files with 60 additions and 7 deletions

View File

@@ -297,9 +297,17 @@ void GeomFillSurface::slotRedoDocument(const Gui::Document&)
checkCommand = true;
}
void GeomFillSurface::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj)
{
// If this view provider is being deleted then reset the colors of
// referenced part objects. The dialog will be deleted later.
if (this->vp == &Obj) {
this->vp->highlightReferences(false);
}
}
bool GeomFillSurface::accept()
{
this->vp->highlightReferences(false);
selectionMode = None;
Gui::Selection().rmvSelectionGate();
@@ -325,6 +333,8 @@ bool GeomFillSurface::accept()
return false;
}
this->vp->highlightReferences(false);
Gui::Command::commitCommand();
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
Gui::Command::updateActive();