]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Small code refactoring.
authorakl <alexander.kovalev@opencascade.com>
Tue, 24 Jun 2014 13:20:50 +0000 (17:20 +0400)
committerakl <alexander.kovalev@opencascade.com>
Tue, 24 Jun 2014 13:20:50 +0000 (17:20 +0400)
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx

index 272d63d654aa3f0609f7532a9acf67e637f98456..4fa9d4efa8afe306251dc81f43500fa1453659cc 100644 (file)
@@ -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