remove Application::runPythonCode

This commit is contained in:
wmayer
2016-09-15 23:14:31 +02:00
parent 99d9fadb0a
commit 947f9575de
19 changed files with 118 additions and 140 deletions

View File

@@ -31,6 +31,7 @@
#include "DlgProjectUtility.h"
#include "Application.h"
#include "Command.h"
#include "ui_DlgProjectUtility.h"
@@ -140,7 +141,7 @@ void DlgProjectUtility::on_extractButton_clicked()
str << doctools << "\n";
str << "extractDocument(\"" << (const char*)source.toUtf8()
<< "\", \"" << (const char*)dest.toUtf8() << "\")";
Application::Instance->runPythonCode(str.str().c_str());
Gui::Command::runCommand(Gui::Command::App, str.str().c_str());
}
void DlgProjectUtility::on_createButton_clicked()
@@ -162,7 +163,7 @@ void DlgProjectUtility::on_createButton_clicked()
str << doctools << "\n";
str << "createDocument(\"" << (const char*)source.toUtf8()
<< "\", \"" << (const char*)dest.toUtf8() << "\")";
Application::Instance->runPythonCode(str.str().c_str());
Gui::Command::runCommand(Gui::Command::App, str.str().c_str());
if (ui->checkLoadProject->isChecked())
Application::Instance->open((const char*)dest.toUtf8(),"FreeCAD");