From d8cc809e8cd33af42a2995b2c1fa08935f3151e0 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 11 Sep 2015 11:46:08 +0300 Subject: [PATCH] Update error manager processing. Error is got firstly from the feature, then from the GUI state. 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 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index d11636140..50d4cd86e 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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; -- 2.39.2