#include <ModelAPI_Result.h>\r
#include <ModelAPI_AttributeReference.h>\r
#include <ModelAPI_AttributeRefList.h>\r
+#include <ModelAPI_Session.h>\r
+#include <ModelAPI_Validator.h>\r
\r
#include <Config_WidgetAPI.h>\r
\r
myBaseFeature->data()->referencesToObjects(aRefs);\r
std::list<std::pair<std::string, std::list<ObjectPtr> > >::const_iterator\r
anIt = aRefs.begin(), aLast = aRefs.end();\r
+ std::set<ResultPtr> alreadyThere; // to avoid duplications\r
for (; anIt != aLast; anIt++) {\r
+ if (!ModelAPI_Session::get()->validators()->\r
+ isConcealed(myBaseFeature->getKind(), anIt->first))\r
+ continue; // use only concealed attributes\r
std::list<ObjectPtr> anObjects = (*anIt).second;\r
std::list<ObjectPtr>::const_iterator anOIt = anObjects.begin(), anOLast = anObjects.end();\r
for (; anOIt != anOLast; anOIt++) {\r
ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(*anOIt);\r
if (aResult && aResult->isConcealed()) {\r
+ if (alreadyThere.find(aResult) == alreadyThere.end()) // issue 1712, avoid duplicates\r
+ alreadyThere.insert(aResult);\r
+ else continue;\r
int aRowId = myView->rowCount();\r
addViewRow(aResult);\r
myConcealedResults[aRowId] = aResult;\r