Salome HOME
Refresh menu size after chnges in preferences
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index adf7b27481b978ee2bf0799d1970bcb80d068e33..b686fcebf3c80e4b8d4971e6576552afb47d14c4 100644 (file)
@@ -94,8 +94,8 @@ void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& t
 
       ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast<ModuleBase_WidgetPoint2D*>(*anIt);
       if (aPointWidget)
-        connect(aPointWidget, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)),
-                this, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)));
+        connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)),
+                this, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)));
     }
     ModuleBase_ModelWidget* aLastWidget = theWidgets.last();
     if (aLastWidget) {
@@ -144,7 +144,8 @@ QWidget* XGUI_PropertyPanel::contentWidget()
 void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature)
 {
   foreach(ModuleBase_ModelWidget* eachWidget, myWidgets) {
-    eachWidget->restoreValue(theFeature);
+    eachWidget->setFeature(theFeature);
+    eachWidget->restoreValue();
   }
   // the repaint is used here to immediatelly react in GUI to the values change.
   repaint();
@@ -166,3 +167,9 @@ void XGUI_PropertyPanel::onActivateNextWidget(ModuleBase_ModelWidget* theWidget)
   }
   emit widgetActivated(aNextWidget);
 }
+
+void XGUI_PropertyPanel::setAcceptEnabled(bool isEnabled)
+{
+  QPushButton* anOkBtn = findChild<QPushButton*>(XGUI::PROP_PANEL_OK);
+  anOkBtn->setEnabled(isEnabled);
+}