Reset edit after dialogs

This commit is contained in:
WandererFan
2017-01-03 20:13:15 -05:00
parent e477f0add0
commit 7231419234
4 changed files with 23 additions and 3 deletions

View File

@@ -285,10 +285,10 @@ bool TaskSectionView::accept()
{
if (strcmp(sectionDir,"unset") == 0) {
Base::Console().Message("No direction selected!\n");
reject();
return false;
return reject();
} else {
updateValues();
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
return true;
}
}
@@ -301,6 +301,7 @@ bool TaskSectionView::reject()
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().%s.removeView(App.activeDocument().%s)",
PageName.c_str(),SectionName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().removeObject('%s')",SectionName.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
return false;
}