Salome HOME
Merge branch 'python_parametric_api' of https://git.salome-platform.org/git/modules...
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index ceb3f817d69fffa9f8bb3253088c05ee4f5629d3..52212d11bff20202126610c9e6f0ffc706be39e7 100755 (executable)
@@ -617,10 +617,10 @@ void XGUI_Workshop::connectToPropertyPanel(const bool isToConnect)
     foreach (ModuleBase_ModelWidget* aWidget, aWidgets) {
        myModule->connectToPropertyPanel(aWidget, isToConnect);
       if (isToConnect) {
-        connect(aWidget, SIGNAL(valueStateChanged()), this, SLOT(onValueStateChanged()));
+        connect(aWidget, SIGNAL(valueStateChanged(int)), this, SLOT(onWidgetStateChanged(int)));
       }
       else {
-        disconnect(aWidget, SIGNAL(valueStateChanged()), this, SLOT(onValueStateChanged()));
+        disconnect(aWidget, SIGNAL(valueStateChanged(int)), this, SLOT(onWidgetStateChanged(int)));
       }
     }
   }
@@ -862,10 +862,7 @@ void XGUI_Workshop::onRebuild()
 }
 
 //******************************************************
-}
-
-//******************************************************
-void XGUI_Workshop::onValueStateChanged()
+void XGUI_Workshop::onWidgetStateChanged(int thePreviousState)
 {
   ModuleBase_ModelWidget* anActiveWidget = 0;
   ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
@@ -876,6 +873,10 @@ void XGUI_Workshop::onValueStateChanged()
   }
   if (anActiveWidget)
     operationMgr()->onValidateOperation();
+
+  myModule->widgetStateChanged(thePreviousState);
+}
+
 ModuleBase_IModule* XGUI_Workshop::loadModule(const QString& theModule)
 {
   QString libName = QString::fromStdString(library(theModule.toStdString()));