Salome HOME
Issue #17347: B-Splines in Sketcher
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFactory.cpp
index 7f51a61a7cebe597e8b0cb4c1b41f1636c814238..0467869f9b0e40256c5d006b77c42056c8999925 100644 (file)
@@ -161,8 +161,12 @@ void ModuleBase_WidgetFactory::createPanel(ModuleBase_PageBase* thePage,
   std::string aPanelName = myWidgetApi->getProperty(PROPERTY_PANEL_ID);
   if (!aPanelName.empty() && ModuleBase_WidgetCreatorFactory::get()->hasPanelWidget(aPanelName)) {
     QWidget* aPanel = ModuleBase_WidgetCreatorFactory::get()->createPanelByType(aPanelName,
-                                                               thePage->pageWidget(), theFeature);
-    thePage->addWidget(aPanel);
+        thePage->pageWidget(), theFeature, myWidgetApi);
+    ModuleBase_ModelWidget* aModelWdg = dynamic_cast<ModuleBase_ModelWidget*>(aPanel);
+    if (aModelWdg)
+      thePage->addModelWidget(aModelWdg);
+    else
+      thePage->addWidget(aPanel);
     thePage->alignToTop();
   }
 }