do not use doCommand without using format string, add overloaded method of runCommand

This commit is contained in:
wmayer
2016-09-15 18:53:37 +02:00
parent 1efd9a4b4f
commit f44df3cdf0
17 changed files with 60 additions and 47 deletions

View File

@@ -4255,7 +4255,7 @@ bool ViewProviderSketch::setEdit(int ModNum)
);
cmdstr.replace(QString::fromLatin1("{sketch_name}"),QString::fromLatin1(this->getSketchObject()->getNameInDocument()));
QByteArray cmdstr_bytearray = cmdstr.toLatin1();
Gui::Command::doCommand(Gui::Command::Gui, cmdstr_bytearray.data());
Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray);
} catch (Base::PyException &e){
Base::Console().Error("ViewProviderSketch::setEdit: visibility automation failed with an error: \n");
e.ReportException();
@@ -4620,7 +4620,7 @@ void ViewProviderSketch::unsetEdit(int ModNum)
);
cmdstr.replace(QString::fromLatin1("{sketch_name}"),QString::fromLatin1(this->getSketchObject()->getNameInDocument()));
QByteArray cmdstr_bytearray = cmdstr.toLatin1();
Gui::Command::doCommand(Gui::Command::Gui, cmdstr_bytearray.data());
Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray);
} catch (Base::PyException &e){
Base::Console().Error("ViewProviderSketch::unsetEdit: visibility automation failed with an error: \n");
e.ReportException();
@@ -4667,7 +4667,7 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo
);
cmdstr.replace(QString::fromLatin1("{sketch_name}"),QString::fromLatin1(this->getSketchObject()->getNameInDocument()));
QByteArray cmdstr_bytearray = cmdstr.toLatin1();
Gui::Command::doCommand(Gui::Command::Gui, cmdstr_bytearray.data());
Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray);
} catch (Base::PyException &e){
Base::Console().Error("ViewProviderSketch::setEdit: visibility automation failed with an error: \n");
e.ReportException();