X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISUGUI%2FVisuGUI_Selection.cxx;h=371d50a50bf7f028d303132b8cf7b5e644beb78e;hb=e208a04edd5d8cebc0185834ecdf3faec4514f99;hp=5bcf465face56786563e21be085f1cefb845ce6a;hpb=776278fcaf14fcaa6265ddca8116a6a0209aa375;p=modules%2Fvisu.git diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index 5bcf465f..371d50a5 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -30,6 +30,7 @@ #include "VisuGUI.h" #include "VisuGUI_Tools.h" +#include "VisuGUI_ViewTools.h" #include "VISU_Actor.h" #include "VISU_PrsObject_i.hh" @@ -49,7 +50,6 @@ #include "SALOME_ListIteratorOfListIO.hxx" #include "SVTK_ViewWindow.h" -#include "SVTK_ViewModel.h" #include "SVTK_Selector.h" #include "utilities.h" @@ -263,7 +263,7 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule): // Activate Points pane myWidgetStack->raiseWidget(myPointsPane); - if(SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(myModule)) + if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule)) aViewWindow->SetSelectionMode(NodeSelection); onSelectionEvent(); @@ -276,7 +276,7 @@ VisuGUI_SelectionDlg::~VisuGUI_SelectionDlg() void VisuGUI_SelectionDlg::onSelectionChange (int theId) { - SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(myModule); + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule); if (!aViewWindow) return; switch (theId) { @@ -300,11 +300,10 @@ void VisuGUI_SelectionDlg::onSelectionChange (int theId) void VisuGUI_SelectionDlg::closeEvent (QCloseEvent* theEvent) { - if( mySelectionDlg ) - { + if (mySelectionDlg) { mySelectionDlg = NULL; disconnect(mySelectionMgr,0,0,0); - if(SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(myModule)){ + if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule)) { switch(aViewWindow->SelectionMode()){ case NodeSelection: case CellSelection: @@ -337,10 +336,10 @@ template QString getVector(TData* theData, int theId){ #define ABS(a) (a>=0)?a:-a void VisuGUI_SelectionDlg::onSelectionEvent() { - SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(myModule); + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(myModule); if (!aViewWindow) return; - switch(aViewWindow->SelectionMode()){ + switch (aViewWindow->SelectionMode()) { case NodeSelection: case CellSelection: case ActorSelection: @@ -538,7 +537,7 @@ bool onIdEdit (const QString& theText, QLabel* theFieldName) { SalomeApp_Application* anApp = theModule->getApp(); - SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(theModule); + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(theModule); if (!aViewWindow) return false; SVTK_Selector* aSelector = aViewWindow->GetSelector();