[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Thu Jan 13 18:45:40 CET 2005


CVS commit by arwalker: 

Don't ask the user if they want to save if there are no windows open, as there is little point in saving an empty kstt file. This also has the added advantage that if you open a kst file, close the window(s) and then close kst you can't inadvertently save an empty kst file.


  M +30 -28    kstdoc.cpp   1.147


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.146:1.147
@@ -92,4 +92,5 @@ bool KstDoc::saveModified(bool doDelete)
   if (_modified) {
     KstApp *win = static_cast<KstApp*>(parent());
+    if (win->activeWindow()) {
     int want_save = KMessageBox::warningYesNoCancel( win, i18n("The current plot definition has been modified. Do you want to save it?"), i18n("Question"));
     switch (want_save) {
@@ -126,4 +127,5 @@ bool KstDoc::saveModified(bool doDelete)
     }
   }
+  }
 
   return completed;




More information about the Kst mailing list