Set column field of wxDVC ITEM_{ACTIVATED,CONTEXT_MENU} events.
Add missing calls to wxDataViewEvent::SetColumn() and SetDataViewColumn(). In the future it would be nice to refactor the code to have a common event object initialization function that would make it impossible to forget to do this. Closes #12649. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3623,6 +3623,8 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
||||
wxWindow *parent = GetParent();
|
||||
wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, parent->GetId());
|
||||
le.SetItem( item );
|
||||
le.SetColumn( col->GetModelColumn() );
|
||||
le.SetDataViewColumn( col );
|
||||
le.SetEventObject(parent);
|
||||
le.SetModel(GetOwner()->GetModel());
|
||||
|
||||
@@ -3693,6 +3695,8 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
||||
wxWindow *parent = GetParent();
|
||||
wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, parent->GetId());
|
||||
le.SetItem( item );
|
||||
le.SetColumn( col->GetModelColumn() );
|
||||
le.SetDataViewColumn( col );
|
||||
le.SetEventObject(parent);
|
||||
le.SetModel(GetOwner()->GetModel());
|
||||
le.SetValue(value);
|
||||
|
Reference in New Issue
Block a user