diff options
-rw-r--r-- | gpgwin.cpp | 1 | ||||
-rw-r--r-- | textedit.cpp | 9 |
2 files changed, 8 insertions, 2 deletions
@@ -423,6 +423,7 @@ void GpgWin::createDockWindows() void GpgWin::closeEvent(QCloseEvent *event) { + /** ask to save changes, if text modified */ if (edit->maybeSave()) { diff --git a/textedit.cpp b/textedit.cpp index bc1caf8..7c1d4ce 100644 --- a/textedit.cpp +++ b/textedit.cpp @@ -282,10 +282,15 @@ bool TextEdit::maybeSave() { EditorPage *page = curPage(); - if (page == 0) + if(tabWidget->count() == 0) { + return true; + } + + // whats this supposed to do? it blocks closing program when all tabs closed + /*if (page == 0) { return false; - } + }*/ QTextDocument *document = page->getTextPage()->document(); |