Salome HOME
Fix SketcherSetEqual.test_length_equality
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetChoice.cpp
index e77c2d9790cb284b03278ed5dd03194e8b422386..3bb748f63f6f69f6a2d06a564474ed3e21f3acb4 100644 (file)
@@ -21,18 +21,17 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
                                                  const std::string& theParentId)
     : ModuleBase_ModelWidget(theParent, theData, theParentId)
 {
-  myContainer = new QWidget(theParent);
-  QHBoxLayout* aLayout = new QHBoxLayout(myContainer);
+  QHBoxLayout* aLayout = new QHBoxLayout(this);
   ModuleBase_Tools::adjustMargins(aLayout);
 
   QString aLabelText = QString::fromStdString(theData->widgetLabel());
   QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
-  myLabel = new QLabel(aLabelText, myContainer);
+  myLabel = new QLabel(aLabelText, this);
   if (!aLabelIcon.isEmpty())
     myLabel->setPixmap(QPixmap(aLabelIcon));
   aLayout->addWidget(myLabel);
 
-  myCombo = new QComboBox(myContainer);
+  myCombo = new QComboBox(this);
   aLayout->addWidget(myCombo, 1);
  
   std::string aTypes = theData->getProperty("string_list");
@@ -56,7 +55,7 @@ bool ModuleBase_WidgetChoice::storeValueCustom() const
   return true;
 }
 
-bool ModuleBase_WidgetChoice::restoreValue()
+bool ModuleBase_WidgetChoice::restoreValueCustom()
 {
   DataPtr aData = myFeature->data();
   std::shared_ptr<ModelAPI_AttributeInteger> aIntAttr = aData->integer(attributeID());