wxEVT_PG_SELECTED event object generated when property is unselected should refer to the property being unselected.
Currently, wxEVT_PG_SELECTED event object generated when property is unselected doesn't refer to the property being unselected (in fact it doesn't refer to any property; pointer to the property is NULL) and therefore it is not possible to determine unselected property or to check its state. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4376,8 +4376,10 @@ 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, NULL );
|
||||
SendEvent( wxEVT_PG_SELECTED, p? p: prevFirstSel, NULL );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user