]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetChoice.cpp
Salome HOME
Issue #2388: Take into account attribute ID for remembering of a user choice
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetChoice.cpp
index 9d48799b68ab0713ec6e64934d134ad6d54f8870..ea04160b52f36ff0e1af50ffa770e24f68448f57 100644 (file)
@@ -44,9 +44,9 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
                                                  const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData), myIsFirst(true)
 {
-  myHasValue = defaultValues.contains(myFeatureId);
+  myHasValue = defaultValues.contains(myFeatureId + attributeID());
   if (myHasValue)
-    myDefValue = defaultValues[myFeatureId];
+    myDefValue = defaultValues[myFeatureId + attributeID()];
   else
     myDefValue = 0;
 
@@ -177,5 +177,5 @@ void ModuleBase_WidgetChoice::onCurrentIndexChanged(int theIndex)
 
 void ModuleBase_WidgetChoice::onFeatureAccepted()
 {
-  defaultValues[myFeatureId] = myDefValue;
+  defaultValues[myFeatureId + attributeID()] = myDefValue;
 }