- ObjectPtr aFeature = aDisplayer->getObject(anIO);
- aPrs.setFeature(aFeature);
- aPresentations.append(aPrs);
+void XGUI_Selection::getSelectedInBrowser(QList<ModuleBase_ViewerPrs>& thePresentations) const
+{
+ // collect the objects of the parameter presentation to avoid a repeted objects in the result
+ QObjectPtrList aPresentationObjects;
+ QList<ModuleBase_ViewerPrs>::const_iterator aPrsIt = thePresentations.begin(),
+ aPrsLast = thePresentations.end();
+ for (; aPrsIt != aPrsLast; aPrsIt++) {
+ aPresentationObjects.push_back((*aPrsIt).object());
+ }
+
+ QObjectPtrList anObjects = selectedObjects();
+ QObjectPtrList::const_iterator anIt = anObjects.begin(), aLast = anObjects.end();
+ for (; anIt != aLast; anIt++) {
+ ObjectPtr anObject = *anIt;
+ if (anObject.get() != NULL && !aPresentationObjects.contains(anObject)) {
+ thePresentations.append(ModuleBase_ViewerPrs(anObject, TopoDS_Shape(), NULL));