+}
+
+//**************************************************************
+void XGUI_SelectionMgr::onViewerSelection()
+{
+ emit selectionChanged();
+}
+
+//**************************************************************
+QFeatureList XGUI_SelectionMgr::selectedFeatures() const
+{
+ return myWorkshop->objectBrowser()->selectedFeatures();
+}
+
+//**************************************************************
+QModelIndexList XGUI_SelectionMgr::selectedIndexes() const
+{
+ return myWorkshop->objectBrowser()->selectionModel()->selectedIndexes();
+}
+
+//**************************************************************
+void XGUI_SelectionMgr::selectedAISObjects(AIS_ListOfInteractive& theList) const
+{
+ if (myWorkshop->isSalomeMode()) {
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->salomeConnector()->AISContext();
+ theList.Clear();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
+ theList.Append(aContext->SelectedInteractive());
+ } else {
+ XGUI_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
+ aViewer->getSelectedObjects(theList);
+ }
+}
+
+//**************************************************************
+void XGUI_SelectionMgr::selectedShapes(NCollection_List<TopoDS_Shape>& theList) const
+{
+ if (myWorkshop->isSalomeMode()) {
+ theList.Clear();
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->salomeConnector()->AISContext();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) {
+ TopoDS_Shape aShape = aContext->SelectedShape();
+ if (!aShape.IsNull())
+ theList.Append(aShape);
+ }
+ } else {
+ XGUI_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
+ aViewer->getSelectedShapes(theList);
+ }