+ fix crash when trying to edit broken revolve object
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include "ViewProvider.h"
|
||||
#include <Mod/Part/App/PropertyTopoShape.h>
|
||||
#include <Gui/Command.h>
|
||||
//#include <Gui/Document.h>
|
||||
#include <Base/Exception.h>
|
||||
|
||||
using namespace PartDesignGui;
|
||||
|
||||
@@ -48,7 +48,12 @@ bool ViewProvider::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());
|
||||
try {
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().setEdit('%s',0)",this->pcObject->getNameInDocument());
|
||||
}
|
||||
catch (const Base::Exception&) {
|
||||
Gui::Command::abortCommand();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user