Skip to content
Snippets Groups Projects
Commit 2ba2eeaf authored by Savici, Andrei T.'s avatar Savici, Andrei T.
Browse files

Merge remote-tracking branch 'origin/bugfix/8513_fix_script_window_save_exception_new'

parents b3c0ccab df19e109
No related merge requests found
...@@ -50,16 +50,26 @@ void ScriptFileInterpreter::prepareToClose() ...@@ -50,16 +50,26 @@ void ScriptFileInterpreter::prepareToClose()
QPushButton *saveAsButton = msgBox.addButton("Save As...", QMessageBox::AcceptRole); QPushButton *saveAsButton = msgBox.addButton("Save As...", QMessageBox::AcceptRole);
msgBox.addButton(QMessageBox::Discard); msgBox.addButton(QMessageBox::Discard);
int ret = msgBox.exec(); int ret = msgBox.exec();
if( msgBox.clickedButton() == saveAsButton )
{ try
m_editor->saveAs();
}
else if( ret == QMessageBox::Save )
{ {
m_editor->saveToCurrentFile(); if( msgBox.clickedButton() == saveAsButton )
{
m_editor->saveAs();
}
else if( ret == QMessageBox::Save )
{
m_editor->saveToCurrentFile();
}
else
{
m_editor->setModified(false);
}
} }
else //Catch cancelling save dialogue
catch( ScriptEditor::SaveCancelledException& sce )
{ {
UNUSED_ARG(sce);
m_editor->setModified(false); m_editor->setModified(false);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment