[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Nov 18 00:27:27 CET 2004


CVS commit by staikos: 

disallow doubleclicking of OK


  M +18 -2     dataobjectdialog.h   1.7


--- kdeextragear-2/kst/kst/dataobjectdialog.h  #1.6:1.7
@@ -62,4 +62,6 @@ void DIALOGTYPE::show_Edit(const QString
   show();
   raise();
+  _OK->setEnabled(true);
+  _cancel->setEnabled(true);
 }
 
@@ -75,11 +77,25 @@ void DIALOGTYPE::show_New() {
   show();
   raise();
+  _OK->setEnabled(true);
+  _cancel->setEnabled(true);
 }
 
 void DIALOGTYPE::OK() {
+  _OK->setEnabled(false);
+  _cancel->setEnabled(false);
   if (_newDialog || (DP == 0L)) {
-    if (new_I()) close();
+    if (new_I()) {
+      close();
   } else {
-    if (edit_I()) close();
+      _OK->setEnabled(true);
+      _cancel->setEnabled(true);
+    }
+  } else {
+    if (edit_I()) {
+      close();
+    } else {
+      _OK->setEnabled(true);
+      _cancel->setEnabled(true);
+    }
   }
 }





More information about the Kst mailing list