vetoing item collapse works again

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-09-16 13:32:03 +00:00
parent 0b26605d52
commit 9f6af110ff

View File

@@ -950,7 +950,7 @@ void wxTreeCtrl::Collapse(const wxTreeItemId& itemId)
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, GetId() );
event.m_item = item;
event.SetEventObject( this );
if ( ProcessEvent( event ) && event.m_code )
if ( ProcessEvent( event ) && !event.IsAllowed() )
{
// cancelled by program
return;