X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=55b31e524992ad655dae41f74183e459bf5d2f75;hb=590a56bae013abd634dbc628f1cdb9c4e4334c4b;hp=47e8f82c2a554187a58180597899e548b2f1fe96;hpb=9a358116f4ee87b52d3d86752c4fb6b3f814a69f;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 47e8f82c2..55b31e524 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -49,7 +49,7 @@ #include "SUIT_Desktop.h" #include "SalomeApp_Study.h" -#include "SalomeApp_SelectionMgr.h" +#include "LightApp_SelectionMgr.h" #include "SVTK_Selector.h" #include "SVTK_ViewWindow.h" @@ -230,10 +230,9 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose), mySelector(SMESH::GetViewWindow(theModule)->GetSelector()), mySelectionMgr(SMESH::GetSelectionMgr(theModule)), - myViewWindow(SMESH::GetViewWindow(theModule)), mySMESHGUI(theModule) { - mySimulation = new SMESH::TNodeSimulation(myViewWindow); + mySimulation = new SMESH::TNodeSimulation(SMESH::GetViewWindow( mySMESHGUI )); QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_NODE"))); if (!name) @@ -382,7 +381,8 @@ void SMESHGUI_NodesDlg::Init () // set selection mode SMESH::SetPointRepresentation(true); - myViewWindow->SetSelectionMode(NodeSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(NodeSelection); SelectionIntoArgument(); } @@ -468,7 +468,8 @@ bool SMESHGUI_NodesDlg::ClickOnApply() void SMESHGUI_NodesDlg::ClickOnCancel() { disconnect(mySelectionMgr, 0, this, 0); - myViewWindow->SetSelectionMode(ActorSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); mySimulation->SetVisibility(false); SMESH::SetPointRepresentation(false); @@ -571,7 +572,8 @@ void SMESHGUI_NodesDlg::ActivateThisDialog() GroupButtons->setEnabled(true); SMESH::SetPointRepresentation(true); - myViewWindow->SetSelectionMode(NodeSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(NodeSelection); SelectionIntoArgument(); }