Fix potential race when cancelling DPG creation

This commit is contained in:
WandererFan
2017-01-28 12:40:19 -05:00
parent 722b2d1c04
commit 49c2be14ba
3 changed files with 11 additions and 26 deletions

View File

@@ -480,6 +480,8 @@ bool TaskProjGroup::reject()
PageName.c_str(),multiViewName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().removeObject('%s')",multiViewName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
//make sure any dangling objects are cleaned up
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()");
} else {
if (Gui::Command::hasPendingCommand()) {
std::vector<std::string> undos = Gui::Application::Instance->activeDocument()->getUndoVector();