[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Oct 15 21:30:22 CEST 2004


CVS commit by arwalker: 

Don't bother prompting the user for the closing of an empty window.


  M +7 -3      kstviewwindow.cpp   1.41


--- kdeextragear-2/kst/kst/kstviewwindow.cpp  #1.40:1.41
@@ -263,4 +263,5 @@ void KstViewWindow::setCaption(const QSt
 void KstViewWindow::closeEvent(QCloseEvent *e) {
   if (KstSettings::globalSettings()->promptWindowClose) {
+    if (view()->children().size()) {
     if (KMessageBox::warningYesNo(0L, i18n("Are you sure you want to close window '%1'?  Closing a window deletes all plots in the window.").arg(caption())) == KMessageBox::Yes) {
       KMdiChildView::closeEvent(e);
@@ -271,4 +272,7 @@ void KstViewWindow::closeEvent(QCloseEve
     KMdiChildView::closeEvent(e);
   }
+  } else {
+    KMdiChildView::closeEvent(e);
+  }
 }
 





More information about the Kst mailing list