]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetFactory.cpp
Salome HOME
Issue #422 - Application hangs up when apply Fillet constraint on preselected segments
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.cpp
index 023c728a9820d246da78e29c69444f4a470fbdb3..6925ee993efa84fad1448ebf86bd84900368af51 100644 (file)
@@ -103,13 +103,9 @@ void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage)
           QString aCaseId = qs(myWidgetApi->getProperty(_ID));
           ModuleBase_PageBase* aPage = new ModuleBase_PageWidget(aWidget);
           createWidget(aPage);
-          QWidget* aCasePageWidget = dynamic_cast<QWidget*>(aPage);
-          if (aWdgType == WDG_SWITCH) {
-            ModuleBase_WidgetSwitch* aSwitch = qobject_cast<ModuleBase_WidgetSwitch*>(aWidget);
-            aSwitch->addPage(aCasePageWidget, aPageName);
-          } else if (aWdgType == WDG_TOOLBOX) {
-            ModuleBase_WidgetToolbox* aToolbox = qobject_cast<ModuleBase_WidgetToolbox*>(aWidget);
-            aToolbox->addPage(aPage, aPageName, aCaseId);
+          if (aWdgType == WDG_SWITCH || aWdgType == WDG_TOOLBOX) {
+            ModuleBase_PagedContainer* aContainer = qobject_cast<ModuleBase_PagedContainer*>(aWidget);
+            aContainer->addPage(aPage, aPageName, aCaseId);
           }
         } while (myWidgetApi->toNextWidget());
       }
@@ -136,9 +132,6 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory
   } else if (theType == WDG_BOOLVALUE) {
     result = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi, myParentId);
 
-  } else if (theType == WDG_DOUBLEVALUE_EDITOR) {
-    result = new ModuleBase_WidgetEditor(theParent, myWidgetApi, myParentId);
-
   } else if (theType == WDG_FILE_SELECTOR) {
     result = new ModuleBase_WidgetFileSelector(theParent, myWidgetApi, myParentId);
 
@@ -156,7 +149,6 @@ ModuleBase_ModelWidget* ModuleBase_WidgetFactory
 
   } else if (theType == WDG_SWITCH) {
     result = new ModuleBase_WidgetSwitch(theParent, myWidgetApi, myParentId);
-    return result;
 
   } else if (theType == WDG_TOOLBOX_BOX || theType == WDG_SWITCH_CASE) {
     // Do nothing for "box" and "case"