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.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user