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
This commit is contained in:
parent
dd9ec5961f
commit
d1a92cf322
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user