X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1044a386f0521b9b805b142547783acb96d1a406..284b4c8866ab36694b6ec2a308690bba4db4fed2:/src/generic/treectrl.cpp diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 65f6406654..21f0441055 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -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;