From 1b0d09e5be396308c3dd3d044445180f5191b721 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 27 Dec 2014 11:30:45 +0000 Subject: [PATCH] Do not actually reconnect PG event handlers when attempting to reconnect them to the same window. When in wxPropertyGridManager::ReconnectEventHandlers() new window ID is the same as old window ID then there is no need to do anything with handlers. An assertion warning is displayed in this case to notify about this unusual (and maybe unintended) situation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index c93e43bfad..019530e1c7 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -1903,7 +1903,8 @@ void wxPropertyGridManager::SetPageSplitterLeft(int page, bool subProps) void wxPropertyGridManager::ReconnectEventHandlers(wxWindowID oldId, wxWindowID newId) { - wxASSERT( oldId != newId ); + wxCHECK_RET( oldId != newId, + wxT("Attempting to reconnect event handlers to the same window")); if (oldId != wxID_NONE) {