aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpgwin.cpp1
-rw-r--r--textedit.cpp9
2 files changed, 8 insertions, 2 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 68251de..3670118 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -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();