avoid multiple calls to setSoftThreshold
[mussa.git] / 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 );
   }
 }