Salome HOME
Refs #289 - Spline profile is represented in OCC view as polyline profile
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_DeleteOp.cxx
index 8d55ce79def2d30e95395ec4ad2490f3ddb5fab7..6694e4c294faf02ab21a475f62443750de377a15 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "HYDROGUI_DeleteOp.h"
 
+#include "HYDROGUI_DeleteDlg.h"
 #include "HYDROGUI_Module.h"
 #include "HYDROGUI_Tool.h"
 #include "HYDROGUI_UpdateFlags.h"
@@ -114,13 +115,9 @@ void HYDROGUI_DeleteOp::startOperation()
     return;
   }
 
-  QString aNamesList = anObjNames.join( "\n" );
-  int anAnswer = SUIT_MessageBox::question( module()->getApp()->desktop(),
-                                            tr( "DELETE_OBJECTS" ),
-                                            tr( "CONFIRM_DELETION" ).arg( aNamesList ),
-                                            QMessageBox::Yes | QMessageBox::No,
-                                            QMessageBox::No );
-  if( anAnswer == QMessageBox::No )
+  HYDROGUI_DeleteDlg aDeleteDlg( module()->getApp()->desktop() );
+  aDeleteDlg.setObjectsToRemove( anObjNames );
+  if ( aDeleteDlg.exec() != HYDROGUI_DeleteDlg::Accepted )
   {
     abort();
     return;