X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=55b31e524992ad655dae41f74183e459bf5d2f75;hb=94b4c4f7f76abd57f72199e83f37f0e1d96ee22c;hp=69801bb651cb5085d8b2e7fdd6233523c1078568;hpb=25cec45acb2923f66c849516f31337c1a3c4c687;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 69801bb65..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" @@ -178,15 +178,13 @@ namespace SMESH { aProp->SetRepresentationToPoints(); float anRGB[3]; - anRGB[0] = GetFloat("SMESH:SettingsNodeColorRed",0)/255.; - anRGB[1] = GetFloat("SMESH:SettingsNodeColorGreen",255)/255.; - anRGB[2] = GetFloat("SMESH:SettingsNodeColorBlue",0)/255.; - aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]); + GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 0 ) ); + aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); - float aPointSize = GetFloat("SMESH:SettingsNodesSize",3); - aProp->SetPointSize(aPointSize); + float aPointSize = GetFloat( "SMESH:node_size", 3 ); + aProp->SetPointSize( aPointSize ); - myPreviewActor->SetProperty(aProp); + myPreviewActor->SetProperty( aProp ); aProp->Delete(); myViewWindow->AddActor(myPreviewActor); @@ -232,12 +230,11 @@ 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 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_NODE"))); + QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_NODE"))); if (!name) setName("SMESHGUI_NodesDlg"); resize(303, 185); @@ -384,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(); } @@ -470,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); @@ -573,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(); }