]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update error manager processing. Error is got firstly from the feature, then from...
authornds <nds@opencascade.com>
Fri, 11 Sep 2015 08:46:08 +0000 (11:46 +0300)
committernds <nds@opencascade.com>
Fri, 11 Sep 2015 08:46:43 +0000 (11:46 +0300)
Do not use validationChanged and nestedChanged signals for this. Use direct methods updateAction of error manager.
Update application Accept actions by signal of model about feature state change, but not by updated signal of object.

src/PartSet/PartSet_SketcherMgr.cpp

index d11636140a307e043765c3149b809ca9724f9863..50d4cd86e9e2f504f8569285cfae94fa19197d4d 100644 (file)
@@ -694,8 +694,17 @@ QString PartSet_SketcherMgr::getFeatureError(const FeaturePtr& theFeature)
                                                                         (getCurrentOperation());
     if (aFOperation) {
       FeaturePtr aFeature = aFOperation->feature();
-      if (aFeature.get() && aFeature == theFeature && isNestedCreateOperation(aFOperation))
-        anError = "Please input value in Property Panel. It is not initialized.";
+      if (aFeature.get() && aFeature == theFeature && isNestedCreateOperation(aFOperation)) {
+        QString anAttributeName = "";
+        ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
+        ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
+        if (anActiveWgt) {
+          AttributePtr anAttr = aFeature->attribute(anActiveWgt->attributeID());
+          if (anAttr.get())
+            anAttributeName = anAttr->id().c_str();
+        }
+        anError = "Attribute \"" + anAttributeName + "\" is not initialized.";
+      }
     }
   }
   return anError;