From: Diane Trout Date: Fri, 20 Oct 2006 01:33:10 +0000 (+0000) Subject: avoid multiple calls to setSoftThreshold X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=commitdiff_plain;h=221f92e7044d20031b5704fa3a57a83af2a5b3b4 avoid multiple calls to setSoftThreshold 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. --- diff --git a/qui/MussaWindow.cpp b/qui/MussaWindow.cpp index 6733c33..72829c9 100644 --- a/qui/MussaWindow.cpp +++ b/qui/MussaWindow.cpp @@ -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 ); } }