X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESHGUI%2FSMESHGUI_ClippingDlg.cxx;h=c359f18a69c14ec2db046b66f3118c2320507803;hb=37b13e00d42780dd45236f75cdbac6eddbc09918;hp=82638364b32f185cf30d3770196a50d707bb9b7e;hpb=a3a6c690baad8a568546cceff02dad9af440e9ca;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx index 82638364b..c359f18a6 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx @@ -479,12 +479,12 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule, SVTK_ViewWindow connect(PreviewCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnPreviewToggle(bool))); connect(AutoApplyCheckBox, SIGNAL(toggled(bool)), this, SLOT(onAutoApply(bool))); 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())); - connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject())); /* to close dialog if study frame change */ - connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel())); + connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(reject())); this->show(); } @@ -589,16 +589,17 @@ void SMESHGUI_ClippingDlg::ClickOnApply() void SMESHGUI_ClippingDlg::ClickOnOk() { ClickOnApply(); - ClickOnCancel(); + reject(); } //======================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //======================================================================= -void SMESHGUI_ClippingDlg::ClickOnCancel() +void SMESHGUI_ClippingDlg::reject() { - close(); + //here we can insert actions to do at close. + QDialog::reject(); } //================================================================================= @@ -742,14 +743,8 @@ void SMESHGUI_ClippingDlg::updateActorItem( QListWidgetItem* theItem, if( anItem->checkState() == Qt::Checked ) aNbChecked++; - Qt::CheckState aCheckState = Qt::Unchecked; - if( aNbChecked == aNbItems ) - aCheckState = Qt::Checked; - else if( aNbChecked > 0 ) - aCheckState = Qt::PartiallyChecked; - bool anIsBlocked = SelectAllCheckBox->blockSignals( true ); - SelectAllCheckBox->setCheckState( aCheckState ); + SelectAllCheckBox->setCheckState( aNbChecked == aNbItems ? Qt::Checked : Qt::Unchecked); SelectAllCheckBox->blockSignals( anIsBlocked ); }