Suppress sending spurious wxEVT_PG_SELECTED events.
Don't send wxEVT_PG_SELECTED event when wxPG is ordered to unselect current property but no property is actually selected. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4378,8 +4378,12 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
||||
// call wx event handler (here so that it also occurs on deselection)
|
||||
// In case of deselection previously selected property
|
||||
// is passed to the event object.
|
||||
if ( !(flags & wxPG_SEL_DONT_SEND_EVENT) )
|
||||
SendEvent( wxEVT_PG_SELECTED, p? p: prevFirstSel, NULL );
|
||||
if (!p)
|
||||
{
|
||||
p = prevFirstSel;
|
||||
}
|
||||
if ( !(flags & wxPG_SEL_DONT_SEND_EVENT) && p)
|
||||
SendEvent( wxEVT_PG_SELECTED, p, NULL );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user