+ fixes #0001885: Unhandled exception when trying to enter edit-mode for objects while drawing view is active

This commit is contained in:
wmayer
2014-12-31 14:08:03 +01:00
parent 4d618955b3
commit ca5062cbfe
2 changed files with 20 additions and 5 deletions

View File

@@ -114,10 +114,16 @@ bool ViewProviderPart::doubleClicked(void)
{
std::string Msg("Edit ");
Msg += this->pcObject->Label.getValue();
Gui::Command::openCommand(Msg.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.setEdit('%s',0)",
this->pcObject->getNameInDocument());
return true;
try {
Gui::Command::openCommand(Msg.c_str());
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.setEdit('%s',0)",
this->pcObject->getNameInDocument());
return true;
}
catch (const Base::Exception& e) {
Base::Console().Error("%s\n", e.what());
return false;
}
}
void ViewProviderPart::applyColor(const Part::ShapeHistory& hist,