X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_NodesDlg.cxx;h=2f9c03895119b2ba67fc6a6391f090a0ee64b58f;hb=373c03904b8e3fc5490ff4e17716f0cdcb39c03c;hp=d82ec9c1d8aaaae1d3627a0783f13faa9543ba81;hpb=7c8ba54a1a59535e9fd227321a0f612d2931eea0;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index d82ec9c1d..2f9c03895 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -173,7 +173,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput( aGrid ); + myMapper->SetInputData( aGrid ); aGrid->Delete(); myPreviewActor = SALOME_Actor::New(); @@ -185,11 +185,11 @@ namespace SMESH vtkProperty* aProp = vtkProperty::New(); aProp->SetRepresentationToPoints(); - vtkFloatingPointType anRGB[3]; + double anRGB[3]; GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 0 ) ); aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); - vtkFloatingPointType aPointSize = GetFloat( "SMESH:node_size", 3 ); + double aPointSize = GetFloat( "SMESH:node_size", 3 ); aProp->SetPointSize( aPointSize ); myPreviewActor->SetProperty( aProp ); @@ -370,7 +370,7 @@ void SMESHGUI_NodesDlg::Init() /* signals and slots connections */ connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); - connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ); + connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) ); @@ -381,8 +381,8 @@ void SMESHGUI_NodesDlg::Init() connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), SLOT( SelectionIntoArgument() ) ); connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT( DeactivateActiveDialog() ) ); /* to close dialog if study frame change */ - connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( ClickOnCancel() ) ); - connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnCancel())); + connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( reject() ) ); + connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject())); // set selection mode SMESH::SetPointRepresentation( true ); @@ -414,7 +414,7 @@ void SMESHGUI_NodesDlg::ValueChangedInSpinBox( double newValue ) void SMESHGUI_NodesDlg::ClickOnOk() { if ( ClickOnApply() ) - ClickOnCancel(); + reject(); } //================================================================================= @@ -539,10 +539,10 @@ bool SMESHGUI_NodesDlg::ClickOnApply() } //================================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //================================================================================= -void SMESHGUI_NodesDlg::ClickOnCancel() +void SMESHGUI_NodesDlg::reject() { disconnect( mySelectionMgr, 0, this, 0 ); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) ) @@ -552,7 +552,7 @@ void SMESHGUI_NodesDlg::ClickOnCancel() SMESH::SetPointRepresentation( false ); mySMESHGUI->ResetState(); - reject(); + QDialog::reject(); } //================================================================================= @@ -638,25 +638,6 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument() } } -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void SMESHGUI_NodesDlg::closeEvent( QCloseEvent* ) -{ - this->ClickOnCancel(); /* same than click on cancel button */ -} - -//================================================================================= -// function : hideEvent() -// purpose : caused by ESC key -//================================================================================= -void SMESHGUI_NodesDlg::hideEvent( QHideEvent* ) -{ - if ( !isMinimized() ) - ClickOnCancel(); -} - //================================================================================= // function : enterEvent() // purpose : to reactivate this dialog box when mouse enter onto the window