void redisplay(ObjectPtr theObject, bool isUpdateViewer = true);
/**
- * Add presentations which corresponds to the given features to current selection
- * \param theFeatures a list of features to be selected
+ * Add presentations to current selection. It unhighlight and deselect the current selection.
+ * The shape and result components are processed in the values. If the presentation shape is not
+ * empty, select it, otherwise select the result.
+ * \param theValues a list of presentation to be selected
* \param isUpdateViewer the parameter whether the viewer should be update immediatelly
*/
- void setSelected(const QObjectPtrList& theFeatures, bool isUpdateViewer = true);
-
void setSelected(const QList<ModuleBase_ViewerPrs>& theValues, bool isUpdateViewer = true);
void XGUI_SelectionMgr::onObjectBrowserSelection()
{
QObjectPtrList aObjects = myWorkshop->objectBrowser()->selectedObjects();
+ QList<ModuleBase_ViewerPrs> aSelectedPrs = ModuleBase_ISelection::getViewerPrs(aObjects);
+
XGUI_Displayer* aDisplayer = myWorkshop->displayer();
- aDisplayer->setSelected(aObjects);
+ aDisplayer->setSelected(aSelectedPrs);
emit selectionChanged();
}
bool aBlocked = myWorkshop->objectBrowser()->blockSignals(true);
myWorkshop->objectBrowser()->setObjectsSelected(aFeatures);
myWorkshop->objectBrowser()->blockSignals(aBlocked);
+ QList<ModuleBase_ViewerPrs> aSelectedPrs = ModuleBase_ISelection::getViewerPrs(aFeatures);
XGUI_Displayer* aDisplayer = myWorkshop->displayer();
- aDisplayer->setSelected(aFeatures);
+ aDisplayer->setSelected(aSelectedPrs);
emit selectionChanged();
}