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
This commit is contained in:
George Tasker
2000-12-19 17:25:19 +00:00
parent d9a50173fb
commit 4f8fccd11a

View File

@@ -2411,6 +2411,12 @@ void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event)
} }
case OBJECT_MENU_DELETE: 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()->DeselectItemIfNecessary(data);
wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data); wxResourceManager::GetCurrentResourceManager()->SaveInfoAndDeleteHandler(data);