Mercurial > hg > octave-nkf
diff gui/src/FileEditor.cpp @ 14602:c8453a013000 gui
Cleaned up code. Fixed bug that causes the GUI to freeze when launching another editor.
* FileEditor: Now the call of another process returns immediately. Adjusted text when closing a file.
* MainWindow: Moved creating a lexer into the constructor.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 07 May 2012 02:36:49 +0200 |
parents | 97cb9286919c |
children | 7605e7136b50 |
line wrap: on
line diff
--- a/gui/src/FileEditor.cpp +++ b/gui/src/FileEditor.cpp @@ -38,18 +38,23 @@ void FileEditor::closeEvent(QCloseEvent *event) { - if ( m_mainWindow->isCloseApplication() ) + if ( m_mainWindow->closing () ) { // close wohle application: save file or not if modified - checkFileModified ("Close Octave GUI",0); // no cancel possible + checkFileModified ("Closing Octave", 0); // no cancel possible + event->accept (); } else { // ignore close event if file is not saved and user cancels closing this window - if (checkFileModified ("Close File",QMessageBox::Cancel)==QMessageBox::Cancel) - event->ignore(); + if (checkFileModified ("Close File",QMessageBox::Cancel) == QMessageBox::Cancel) + { + event->ignore (); + } else - event->accept(); + { + event->accept(); + } } }