Skip to content

Commit

Permalink
Gui: fix Document::signalInEdit
Browse files Browse the repository at this point in the history
Make it sure it is signaled with the correct document
  • Loading branch information
realthunder authored and wwmayer committed Dec 21, 2019
1 parent 1cbec1a commit df548bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Gui/Document.cpp
Expand Up @@ -426,8 +426,10 @@ bool Document::setEdit(Gui::ViewProvider* p, int ModNum, const char *subname)
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
if (dlg)
dlg->setDocumentName(this->getDocument()->getName());
if (d->_editViewProvider->isDerivedFrom(ViewProviderDocumentObject::getClassTypeId()))
signalInEdit(*(static_cast<ViewProviderDocumentObject*>(d->_editViewProvider)));
if (d->_editViewProvider->isDerivedFrom(ViewProviderDocumentObject::getClassTypeId())) {
auto vpd = static_cast<ViewProviderDocumentObject*>(d->_editViewProvider);
vpd->getDocument()->signalInEdit(*vpd);
}

App::AutoTransaction::setEnable(false);
return true;
Expand Down

0 comments on commit df548bf

Please sign in to comment.