]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_ModelWidget.cpp
Salome HOME
Issue #3073: Show inspection panel for features
[modules/shaper.git] / src / ModuleBase / ModuleBase_ModelWidget.cpp
index 89546edfd4bacde2ac2f40b91a4258dbcef1a299..f26b8a600f8d0a4b1008b03195dcf448a9271cc1 100644 (file)
@@ -423,6 +423,12 @@ bool ModuleBase_ModelWidget::blockValueState(const bool theBlocked)
 //**************************************************************
 bool ModuleBase_ModelWidget::restoreValue()
 {
+  if (!isEnabled()) {
+    // This code works in inspection panel
+    ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
+    if (!aValidators->isCase(myFeature, attributeID()))
+      return false; // if it is not an active case for the widget
+  }
   emit beforeValuesRestored();
   bool isDone = restoreValueCustom();
   emit afterValuesRestored();