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.
(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;