X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MergeDlg.cxx;h=82884701fc835d6ccb2285cf73a6477c13db4d7c;hp=7446b54b2d58ba9ac8c33bb122f14c71c1d8856b;hb=4cd2499bddcd3da3ec8900fe825bc98669b789b5;hpb=d4a710ce52f6e76786a7b3845e2f7975dc9a00b1 diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index 7446b54b2..82884701f 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -552,7 +552,7 @@ void SMESHGUI_MergeDlg::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())); @@ -571,7 +571,7 @@ void SMESHGUI_MergeDlg::Init() connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); /* to close dialog if study change */ - connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject())); // Init Mesh field from selection SelectionIntoArgument(); @@ -670,7 +670,7 @@ bool SMESHGUI_MergeDlg::ClickOnApply() aMeshEditor->MergeElements (aGroupsOfElements.inout()); if ( myTypeId == 0 ) { - if (myAction ==0) + if (myAction == 0 ) SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INFORMATION"), tr("SMESH_MERGED_NODES").arg(QString::number(ListCoincident->count()).toLatin1().data())); else @@ -697,14 +697,14 @@ bool SMESHGUI_MergeDlg::ClickOnApply() void SMESHGUI_MergeDlg::ClickOnOk() { if (ClickOnApply()) - ClickOnCancel(); + reject(); } //================================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //================================================================================= -void SMESHGUI_MergeDlg::ClickOnCancel() +void SMESHGUI_MergeDlg::reject() { myIdPreview->SetPointsLabeled(false); SMESH::SetPointRepresentation(false); @@ -718,7 +718,7 @@ void SMESHGUI_MergeDlg::ClickOnCancel() if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); - reject(); + QDialog::reject(); } //================================================================================= @@ -1226,26 +1226,6 @@ void SMESHGUI_MergeDlg::enterEvent(QEvent*) ActivateThisDialog(); } -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void SMESHGUI_MergeDlg::closeEvent(QCloseEvent*) -{ - /* same than click on cancel button */ - ClickOnCancel(); -} - -//======================================================================= -//function : hideEvent -//purpose : caused by ESC key -//======================================================================= -void SMESHGUI_MergeDlg::hideEvent (QHideEvent *) -{ - if (!isMinimized()) - ClickOnCancel(); -} - //================================================================================= // function : keyPressEvent() // purpose : @@ -1291,8 +1271,8 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id) SMESH::UpdateView(); // Costruction of the logical filter - SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH); - SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP); + SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH); + SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP); QList aListOfFilters; if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);