#include "XGUI_ObjectsBrowser.h"
#include "XGUI_Viewer.h"
#include "XGUI_SalomeConnector.h"
-#include "XGUI_SalomeViewer.h"
+#include "XGUI_ViewerProxy.h"
#include <ModelAPI_Feature.h>
#include <ModelAPI_PluginManager.h>
//**************************************************************
QModelIndexList XGUI_SelectionMgr::selectedIndexes() const
{
- return myWorkshop->objectBrowser()->selectionModel()->selectedIndexes();
+ return myWorkshop->objectBrowser()->selectedIndexes();
}
//**************************************************************
void XGUI_SelectionMgr::selectedAISObjects(AIS_ListOfInteractive& theList) const
{
- if (myWorkshop->isSalomeMode()) {
- Handle(AIS_InteractiveContext) aContext = myWorkshop->salomeViewer()->AISContext();
- theList.Clear();
- for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
- theList.Append(aContext->SelectedInteractive());
- } else {
- XGUI_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
- aViewer->getSelectedObjects(theList);
- }
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
+ theList.Clear();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
+ theList.Append(aContext->SelectedInteractive());
}
//**************************************************************
void XGUI_SelectionMgr::selectedShapes(NCollection_List<TopoDS_Shape>& theList) const
{
- if (myWorkshop->isSalomeMode()) {
- theList.Clear();
- Handle(AIS_InteractiveContext) aContext = myWorkshop->salomeViewer()->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);
+ theList.Clear();
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) {
+ TopoDS_Shape aShape = aContext->SelectedShape();
+ if (!aShape.IsNull())
+ theList.Append(aShape);
}
}