]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
rnc: Bug fix
authorgdd <gdd>
Thu, 31 Mar 2011 14:48:04 +0000 (14:48 +0000)
committergdd <gdd>
Thu, 31 Mar 2011 14:48:04 +0000 (14:48 +0000)
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx

index 3b748cd57fc70553bd24147cd998f6cb9e4cc9d8..3ed071a45e6bb757576624659d2b5ecd924b5005 100644 (file)
@@ -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){