do not use doCommand without using format string, add overloaded method of runCommand
This commit is contained in:
@@ -464,7 +464,7 @@ void Command::doCommand(DoCmd_Type eType, const char* sCmd, ...)
|
||||
}
|
||||
|
||||
/// Run a App level Action
|
||||
void Command::runCommand(DoCmd_Type eType,const char* sCmd)
|
||||
void Command::runCommand(DoCmd_Type eType, const char* sCmd)
|
||||
{
|
||||
if (eType == Gui)
|
||||
Gui::Application::Instance->macroManager()->addLine(MacroManager::Gui,sCmd);
|
||||
@@ -473,6 +473,16 @@ void Command::runCommand(DoCmd_Type eType,const char* sCmd)
|
||||
Base::Interpreter().runString(sCmd);
|
||||
}
|
||||
|
||||
/// Run a App level Action
|
||||
void Command::runCommand(DoCmd_Type eType, const QByteArray& sCmd)
|
||||
{
|
||||
if (eType == Gui)
|
||||
Gui::Application::Instance->macroManager()->addLine(MacroManager::Gui,sCmd.constData());
|
||||
else
|
||||
Gui::Application::Instance->macroManager()->addLine(MacroManager::App,sCmd.constData());
|
||||
Base::Interpreter().runString(sCmd.constData());
|
||||
}
|
||||
|
||||
void Command::addModule(DoCmd_Type eType,const char* sModuleName)
|
||||
{
|
||||
if(alreadyLoadedModule.find(sModuleName) == alreadyLoadedModule.end()) {
|
||||
@@ -931,7 +941,7 @@ void PythonCommand::activated(int iMsg)
|
||||
}
|
||||
}
|
||||
else {
|
||||
doCommand(Doc,Activation.c_str());
|
||||
runCommand(Doc,Activation.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user