Automatically create actions for each template
This commit is contained in:
@@ -701,10 +701,14 @@ void PythonConsole::runSource(const QString& line)
|
||||
catch (const Base::SystemExitException&) {
|
||||
ParameterGrp::handle hPrefGrp = getWindowParameter();
|
||||
bool check = hPrefGrp->GetBool("CheckSystemExit",true);
|
||||
if (!check) qApp->quit();
|
||||
int ret = QMessageBox::question(this, tr("System exit"), tr("The application is still running.\nDo you want to exit without saving your data?"),
|
||||
QMessageBox::Yes, QMessageBox::No|QMessageBox::Escape|QMessageBox::Default);
|
||||
int ret = QMessageBox::Yes;
|
||||
if (check) {
|
||||
ret = QMessageBox::question(this, tr("System exit"),
|
||||
tr("The application is still running.\nDo you want to exit without saving your data?"),
|
||||
QMessageBox::Yes, QMessageBox::No|QMessageBox::Escape|QMessageBox::Default);
|
||||
}
|
||||
if (ret == QMessageBox::Yes) {
|
||||
PyErr_Clear();
|
||||
qApp->quit();
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user