From 4f8fccd11a1136580d80a67ce0ca61037e89999d Mon Sep 17 00:00:00 2001 From: George Tasker Date: Tue, 19 Dec 2000 17:25:19 +0000 Subject: [PATCH] When deleting an entire dialog in DialogEditor by right clicking and choosing DELETE from the popup menu, you are presented with an ARE YOU SURE message. This prevents the tradgedy of thinking you right clicked a widget, when you actually right clicked the dialog, and then you accidentally delete your unsaved dialog. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/dialoged/src/reseditr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 354ba14410..4960a602cf 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -2411,8 +2411,14 @@ void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event) } case OBJECT_MENU_DELETE: { + if (data->IsKindOf(CLASSINFO(wxPanel))) + { + if (wxMessageBox(wxT("Are you sure?"), wxT("Deleting dialog"), wxYES_NO) == wxNO) + return; + } + wxResourceManager::GetCurrentResourceManager()->DeselectItemIfNecessary(data); - + wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data); wxResourceManager::GetCurrentResourceManager()->DeleteResource(data); wxResourceManager::GetCurrentResourceManager()->DeleteWindow(data); -- 2.45.2