Moved unsetEdit() to ViewProvider to avoid code duplication in all feature ViewProviders

This commit is contained in:
jrheinlaender
2013-05-10 15:32:13 +04:30
committed by Stefan Tröger
parent ba17aa2839
commit bc7dff7339
16 changed files with 25 additions and 106 deletions

View File

@@ -102,20 +102,6 @@ bool ViewProviderDraft::setEdit(int ModNum)
}
}
void ViewProviderDraft::unsetEdit(int ModNum)
{
// return to the WB we were in before editing the PartDesign feature
Gui::Command::assureWorkbench(oldWb.c_str());
if (ModNum == ViewProvider::Default ) {
// when pressing ESC make sure to close the dialog
Gui::Control().closeDialog();
}
else {
PartGui::ViewProviderPart::unsetEdit(ModNum);
}
}
bool ViewProviderDraft::onDelete(const std::vector<std::string> &s)
{
return ViewProvider::onDelete(s);