From 06d15be780db49876e7739c4543391c5feee579e Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 19 Apr 2019 22:24:00 +0200 Subject: [PATCH] Notify wxPropertyGrid about selected property only if new page was selected wxPropertyGridManager::DoSelectPage() returns true also if new page is the same as the current one so we have to use alternative way to check whether we really switched to the new page. --- src/propgrid/propgridiface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index 2d294cd0d5..65203ad74f 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -1175,7 +1175,9 @@ bool wxPropertyGridInterface::RestoreEditableState( const wxString& src, int res if ( selectedPage != -1 ) { - if ( DoSelectPage(selectedPage) ) + wxPropertyGridPageState* curPageState = GetPageState(-1); + DoSelectPage(selectedPage); + if ( GetPageState(-1) != curPageState ) { pg->SendEvent(wxEVT_PG_SELECTED, pg->GetSelectedProperty()); }