Salome HOME
Refresh menu size after chnges in preferences
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index 99f8b066da82feb19b8ebb00cb198f87658d4ca4..b686fcebf3c80e4b8d4971e6576552afb47d14c4 100644 (file)
@@ -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);
+}