Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.cpp
index d89f27de4855c7bf3ef765bd546f33ed05434312..e5212c7e85f70d8d4f61cf562f204976ca77dfd3 100644 (file)
@@ -10,7 +10,6 @@
 #include <ModuleBase_MetaWidget.h>
 #include <ModuleBase_Operation.h>
 #include <ModuleBase_OperationDescription.h>
-#include <ModuleBase_PropPanelOperation.h>
 #include <ModuleBase_WidgetPoint2D.h>
 #include <ModuleBase_WidgetSwitch.h>
 
@@ -185,17 +184,16 @@ QWidget* ModuleBase_WidgetFactory::doubleSpinBoxControl()
   aControlLay->setStretch(1, 1);
   result->setLayout(aControlLay);
   connectWidget(aBox, WDG_DOUBLEVALUE);
-  ModuleBase_MetaWidget* aWrappedWdg =
-      new ModuleBase_MetaWidget(anObjName, aBox, myOperation->feature());
-  myWidgets.append(aWrappedWdg);
   return result;
 }
 
 QWidget* ModuleBase_WidgetFactory::pointSelectorControl(QWidget* theParent)
 {
   ModuleBase_WidgetPoint2D* aWidget = new ModuleBase_WidgetPoint2D(theParent,
-                       qs(myWidgetApi->getProperty(CONTAINER_PAGE_NAME)), myWidgetApi->widgetId());
+                       qs(myWidgetApi->getProperty(CONTAINER_PAGE_NAME)),
+                       myWidgetApi->widgetId());
   connectWidget(aWidget, WDG_POINT_SELECTOR);
+  myModelWidgets.append(aWidget);
   return aWidget->getControl();
 }
 
@@ -207,8 +205,7 @@ bool ModuleBase_WidgetFactory::connectWidget(QObject* theWidget,  const QString&
                               myOperation, SLOT(storeReal(double)));
   }
   if (theType == WDG_POINT_SELECTOR) {
-    ModuleBase_WidgetCustom* aCustom = dynamic_cast<ModuleBase_WidgetCustom*>(theWidget);
-    result = QObject::connect(aCustom, SIGNAL(valuesChanged()), 
+    result = QObject::connect(theWidget, SIGNAL(valuesChanged()),
                               myOperation, SLOT(storeCustomValue()));
   }
   return result;