Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModuleBase / ModuleBase_ChoiceCtrl.cpp
index 38afff3ca6c30efbff3e1c77d4778253554e7f83..67b5b6f186eb55d9b6b085ba783c921a4b63a74e 100644 (file)
@@ -132,6 +132,21 @@ void ModuleBase_ChoiceCtrl::setValue(int theVal)
   }
 }
 
+void ModuleBase_ChoiceCtrl::setValue(const QString& theVal)
+{
+  switch (myType) {
+  case RadioButtons:
+    foreach (QAbstractButton* aBtn, myButtons->buttons()) {
+      aBtn->setChecked(aBtn->toolTip() == theVal);
+    }
+    break;
+  case ComboBox:
+    myCombo->setCurrentText(theVal);
+    break;
+  }
+}
+
+
 void ModuleBase_ChoiceCtrl::setTooltip(QString theTip)
 {
   if (myType == ComboBox)