X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=3f20596c5afcc88d9693e344c939456d0a73d884;hp=47e8f82c2a554187a58180597899e548b2f1fe96;hb=b33324fe602b1fe1158c14a866c3802df12370fa;hpb=c981fa08d90e8e8e91e24424701357141b8dda56 diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 47e8f82c2..3f20596c5 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -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(); }