- std::stringstream aStreamName;
- aStreamName << theAttribute->owner()->data()->name() << "/"<< theAttribute->id();
- aName = aStreamName.str();
+ ModuleBase_Operation* anOperation = theWorkshop->currentOperation();
+
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
+ if (aFeature.get()) {
+ std::string aXmlCfg, aDescription;
+ theWorkshop->module()->getXMLRepresentation(aFeature->getKind(), aXmlCfg, aDescription);
+
+ ModuleBase_WidgetFactory aFactory(aXmlCfg, theWorkshop);
+ std::string anAttributeTitle;
+ aFactory.getAttributeTitle(aFeature->getKind(), theAttribute->id(), anAttributeTitle);
+
+ std::stringstream aStreamName;
+ aStreamName << theAttribute->owner()->data()->name() << "/"<< anAttributeTitle.c_str();
+ aName = aStreamName.str();
+ }