From d331308a891eb4a7649f71ec22981fdf26fddf45 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 27 May 2013 15:19:08 +0000 Subject: [PATCH] 0021935: [CEA 696] Possibility to delete an object even if it was used before to create another one --- src/GEOMGUI/GEOM_msg_en.ts | 6 ++++-- src/GEOMGUI/GEOM_msg_fr.ts | 2 +- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 10 ++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 62a43007a..14a91c320 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -29,8 +29,10 @@ DEP_OBJECT - Selected object has been used to create another one. -It can't be deleted + One or more selected objects are used to create another ones or referenced from other modules. +Removal of these objects can result in valid Python dump. + +Do you still want to delete these objects? DEVIDE_EDGE_NEW_OBJECT_NAME diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index 15354dfd5..ca76c8bca 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -29,7 +29,7 @@ DEP_OBJECT - L'objet choisi a été utilisé pour créer un autre objet. + L'objet choisi a été utilisé pour créer un autre objet. Il n'est pas possible de le supprimer diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 9d6c00c1a..2b8a4abcb 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -543,10 +543,12 @@ void GEOMToolsGUI::OnEditDelete() } else { // GEOM component is not selected: check if selected objects are in use - if ( inUse( aStudy, geomComp, allDeleted ) ) { - SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("DEP_OBJECT") ); + if ( inUse( aStudy, geomComp, allDeleted ) && + SUIT_MessageBox::question( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("DEP_OBJECT"), + SUIT_MessageBox::Yes | SUIT_MessageBox::No, + SUIT_MessageBox::No ) != SUIT_MessageBox::Yes ) { return; // object(s) in use } // ... and then delete all objects -- 2.39.2