From: Vadim Zeitlin <vadim@wxwidgets.org> Date: Tue, 23 Aug 2011 15:11:22 +0000 (+0000) Subject: Fix completely wrong logic for veto checking in generic wxDVC. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d1a92cf322cbc66a5af2e3985b95cffa4deec62e Fix completely wrong logic for veto checking in generic wxDVC. The code sending the event must check whether the event was vetoed or not, not whether it was skipped or not. This is the minimal change resulting in correct behaviour even if an event handler does skip the event. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 7cebed518a..15d51d7992 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2959,7 +2959,7 @@ void wxDataViewMainWindow::Expand( unsigned int row ) SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, node->GetItem()); // Check if the user prevent expanding - if( e.GetSkipped() ) + if( !e.IsAllowed() ) return; node->ToggleOpen(); @@ -3013,7 +3013,7 @@ void wxDataViewMainWindow::Collapse(unsigned int row) { wxDataViewEvent e = SendExpanderEvent(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING,node->GetItem()); - if( e.GetSkipped() ) + if( !e.IsAllowed() ) return; // Find out if there are selected items below the current node.