Added test to reproduce [ 1541148 ] wxTreeCtrol: crash if right mouse click

The MSW tree control sends a series of invalid events.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2006-09-24 11:13:17 +00:00
parent 2335974794
commit 3bb918c097

View File

@ -895,7 +895,12 @@ void MyTreeCtrl::DoToggleIcon(const wxTreeItemId& item)
#define TREE_EVENT_HANDLER(name) \
void MyTreeCtrl::name(wxTreeEvent& event) \
{ \
wxLogMessage(wxT(#name)); \
wxLogMessage( wxT("%s from:"), wxT(#name) ); \
wxTreeItemId item = event.GetItem(); \
if (item.IsOk()) \
wxLogMessage( GetItemText(item) ); \
else \
wxLogMessage(wxT("invalid item")); \
SetLastItem(wxTreeItemId()); \
event.Skip(); \
}