Salome HOME
Merge remote-tracking branch 'remotes/origin/master'
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index 202be90fc640838f981c1e2c15e34171f4a927b7..5067484718d39a2fc1d9fbea5983ce0f6ca6da17 100644 (file)
@@ -8,8 +8,6 @@
 #include <XGUI_Constants.h>
 #include <XGUI_PropertyPanel.h>
 
-#include <ModuleBase_PropPanelOperation.h>
-
 #include <QWidget>
 #include <QVBoxLayout>
 #include <QFrame>
@@ -61,7 +59,7 @@ XGUI_PropertyPanel::~XGUI_PropertyPanel()
 {
 }
 
-void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_IModelWidget*>& theWidgets)
+void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets)
 {
   myWidgets = theWidgets;
 }
@@ -71,9 +69,11 @@ QWidget* XGUI_PropertyPanel::contentWidget()
   return myCustomWidget;
 }
 
-void XGUI_PropertyPanel::updateContentWidget()
+void XGUI_PropertyPanel::updateContentWidget(boost::shared_ptr<ModelAPI_Feature> theFeature)
 {
-  foreach(ModuleBase_IModelWidget* eachWidget, myWidgets) {
-    eachWidget->restoreValue();
+  foreach(ModuleBase_ModelWidget* eachWidget, myWidgets) {
+    eachWidget->restoreValue(theFeature);
   }
+  // the repaint is used here to immediatelly react in GUI to the values change.
+  repaint();
 }