From c53193642977279fc6be831334e6d8e0882ef467 Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 24 Jun 2014 17:20:50 +0400 Subject: [PATCH] Small code refactoring. --- .../GEOMToolsGUI_ReduceStudyDlg.cxx | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx index 272d63d65..4fa9d4efa 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx @@ -641,21 +641,16 @@ void GEOMToolsGUI_ReduceStudyDlg::clickOnOk() objectsToBeUnpublished.insert( *iter ); } if( myGroupIntermediates->checkedId() == 2 ) { // remove - if( myCBSoftRemoval->isChecked() ) - for( iter = myListParents.begin(); iter != myListParents.end(); ++iter ) - objectsToBeRemoved.insert( *iter ); - else { - if ( SUIT_MessageBox::question( this, - tr( "GEOM_WRN_WARNING" ), - tr( "GEOM_REDUCE_STUDY_WARNING_DELETE" ), - QMessageBox::Yes | QMessageBox::No, - QMessageBox::Yes ) == QMessageBox::Yes ) { - for( iter = myListParents.begin(); iter != myListParents.end(); ++iter ) - objectsToBeRemoved.insert( *iter ); - } - else - return; - } + if( !myCBSoftRemoval->isChecked() && + SUIT_MessageBox::question( this, + tr( "GEOM_WRN_WARNING" ), + tr( "GEOM_REDUCE_STUDY_WARNING_DELETE" ), + QMessageBox::Yes | QMessageBox::No, + QMessageBox::Yes ) == QMessageBox::No ) { + return; + } + for( iter = myListParents.begin(); iter != myListParents.end(); ++iter ) + objectsToBeRemoved.insert( *iter ); } // Create lists of sub-objects to be removed or to be unpublished -- 2.39.2