Salome HOME
Issue #1383 Preview button: correction for the case: switch off auto_preview in extru...
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_WidgetCreator.cpp
index 293f8918f314e64813dd8818a5a485a910fbb4f7..90c9249de10f143a7226ee853d3998b437fba699 100755 (executable)
@@ -11,7 +11,7 @@
 SamplePanelPlugin_WidgetCreator::SamplePanelPlugin_WidgetCreator()
 : ModuleBase_IWidgetCreator()
 {
-  myPanelTypes.insert("SampePanel");
+  myPanelTypes.insert("QtPanel");
 }
 
 void SamplePanelPlugin_WidgetCreator::panelTypes(std::set<std::string>& theTypes)
@@ -20,14 +20,17 @@ void SamplePanelPlugin_WidgetCreator::panelTypes(std::set<std::string>& theTypes
 }
 
 QWidget* SamplePanelPlugin_WidgetCreator::createPanelByType(const std::string& theType,
-                                                            QWidget* theParent)
+                                                            QWidget* theParent,
+                                                            const FeaturePtr& theFeature)
 {
   QWidget* aWidget = 0;
   if (myPanelTypes.find(theType) == myPanelTypes.end())
     return aWidget;
 
-  if (theType == "SampePanel") {
-    aWidget = new SamplePanelPlugin_Panel(theParent);
+  if (theType == "QtPanel") {
+    SamplePanelPlugin_Panel* aPanel = new SamplePanelPlugin_Panel(theParent);
+    aPanel->setFeature(theFeature);
+    aWidget = aPanel;
   }
 
   return aWidget;