From 3129dfdcd20988ccc52748531d64beeb3946e5eb Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 31 Mar 2011 14:48:04 +0000 Subject: [PATCH] rnc: Bug fix --- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 3b748cd..3ed071a 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -2290,8 +2290,6 @@ void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, double constDist = that->myDistMap[entry]; QString attEntry = that->myATTMap[entry]; CORBA::Object_var attObj = entryToObject(attEntry); - myGeomSelWdg2->SetObject(obj); - myAttSelWdg->SetObject(attObj); myAttSizeSpin->setValue(phySize); if (sizeMap.startsWith("Attractor")){ myAttDistSpin->setValue(infDist); @@ -2307,6 +2305,8 @@ void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, else{ myConstSizeCheck->setChecked(false); } + myGeomSelWdg2->SetObject(obj); + myAttSelWdg->SetObject(attObj); } else { // CLASSIC MAPS smpTab->setCurrentIndex(SMP_STD_TAB); // Change Tab @@ -2342,7 +2342,9 @@ void BLSURFPluginGUI_HypothesisCreator::onAttractorClicked(int state) myAttDistLabel->setEnabled(true); myAttDistSpin2->setEnabled(true); myAttDistLabel2->setEnabled(true); - myAttSelWdg->SetDefaultText(tr("BLS_SEL_ATTRACTOR"), "QLineEdit { color: grey }"); + if (!myAttSelWdg->IsObjectSelected()){ + myAttSelWdg->SetDefaultText(tr("BLS_SEL_ATTRACTOR"), "QLineEdit { color: grey }"); + } if(myConstSizeCheck->checkState() == Qt::Unchecked){ // Only attractor myAttDistSpin2->setEnabled(false); myAttDistLabel2->setEnabled(false); @@ -2357,7 +2359,9 @@ void BLSURFPluginGUI_HypothesisCreator::onAttractorClicked(int state) myAttDistSpin->setEnabled(false); myAttDistLabel->setEnabled(false); myAttDistSpin->setValue(0.); - myAttSelWdg->SetDefaultText(tr("BLS_SEL_SHAPE"), "QLineEdit { color: grey }"); + if (!myAttSelWdg->IsObjectSelected()){ + myAttSelWdg->SetDefaultText(tr("BLS_SEL_SHAPE"), "QLineEdit { color: grey }"); + } } } } @@ -2374,7 +2378,9 @@ void BLSURFPluginGUI_HypothesisCreator::onConstSizeClicked(int state) myAttDistSpin->setEnabled(false); myAttDistLabel->setEnabled(false); myAttDistSpin->setValue(0.); - myAttSelWdg->SetDefaultText(tr("BLS_SEL_SHAPE"), "QLineEdit { color: grey }"); + if (!myAttSelWdg->IsObjectSelected()){ + myAttSelWdg->SetDefaultText(tr("BLS_SEL_SHAPE"), "QLineEdit { color: grey }"); + } } } if (state == Qt::Unchecked){ -- 2.39.2