avoid multiple calls to setSoftThreshold
authorDiane Trout <diane@caltech.edu>
Fri, 20 Oct 2006 01:33:10 +0000 (01:33 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 20 Oct 2006 01:33:10 +0000 (01:33 +0000)
ticket:200
So I took the easy route and just wrapped a widet->setEnabled(false)
widget->setEnabled(true) around the setSoftThreshold code. Which should
hopefully prevent the possibility of calling setSoftThreshold before
the other call has terminated.

qui/MussaWindow.cpp

index 6733c338e83cffa145c531c163cb4ef915fab498..72829c9aa4ef43329cd09e6b84626987e250bff1 100644 (file)
@@ -592,13 +592,15 @@ void MussaWindow::newMussaWindow()
   win->show();
 }
 
-void MussaWindow::setSoftThreshold(int threshold)
+void MussaWindow::setSoftThreshold(int value)
 {
-  if (analysis->get_soft_threshold() != threshold) {
-    analysis->set_soft_threshold(threshold);
+  if (analysis->get_soft_threshold() != value) {
+    threshold->setEnabled( false );
+    analysis->set_soft_threshold(value);
     analysis->nway();
     updateLinks();
     update();
+    threshold->setEnabled( true );
   }
 }