X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_SelectionMgr.cpp;h=9f830a74ec5757257915168ab59afcb277ad6e58;hb=a3b2736968186ac435b1e05e530c40becbc82301;hp=f949c782a5a4b4a7ca17f5440ef2a7513a1cc441;hpb=c23358fff93a754447d421ca606ae6f570e5c7a5;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index f949c782a..9f830a74e 100644 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -1,10 +1,11 @@ #include "XGUI_SelectionMgr.h" + #include "XGUI_Workshop.h" #include "XGUI_MainWindow.h" #include "XGUI_ObjectsBrowser.h" -#include "XGUI_Viewer.h" #include "XGUI_SalomeConnector.h" #include "XGUI_ViewerProxy.h" +#include "XGUI_Displayer.h" #include #include @@ -29,20 +30,16 @@ void XGUI_SelectionMgr::connectViewers() this, SLOT(onObjectBrowserSelection())); //Connect to other viewers - if (myWorkshop->isSalomeMode()) { - connect(myWorkshop, SIGNAL(salomeViewerSelection()), - this, SLOT(onViewerSelection())); - } else { - connect(myWorkshop->mainWindow()->viewer(), SIGNAL(selectionChanged()), - this, SLOT(onViewerSelection())); - } + connect(myWorkshop->viewer(), SIGNAL(selectionChanged()), + this, SLOT(onViewerSelection())); } //************************************************************** void XGUI_SelectionMgr::onObjectBrowserSelection() { - - // TODO: Highliht selected objects in Viewer 3d + QFeatureList aFeatures = selectedFeatures(); + XGUI_Displayer* aDisplayer = myWorkshop->displayer(); + aDisplayer->setSelected(aFeatures); emit selectionChanged(); } @@ -50,7 +47,9 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() //************************************************************** void XGUI_SelectionMgr::onViewerSelection() { - // TODO: Highliht selected objects in Object Browser + XGUI_Displayer* aDisplayer = myWorkshop->displayer(); + QFeatureList aFeatures = aDisplayer->selectedFeatures(); + myWorkshop->objectBrowser()->setFeaturesSelected(aFeatures); emit selectionChanged(); }