Added missing wxEVT_TREE_KEY_DOWN event generation under wxQt
This commit is contained in:
parent
8fc73d45ce
commit
4652bb05f8
2 changed files with 16 additions and 0 deletions
|
|
@ -137,6 +137,9 @@ protected:
|
|||
|
||||
virtual void OnImagesChanged() override;
|
||||
|
||||
// For wxEVT_TREE_KEY_DOWN generation
|
||||
void OnKeyDown(wxKeyEvent &event);
|
||||
|
||||
private:
|
||||
void SendDeleteEvent(const wxTreeItemId &item);
|
||||
wxTreeItemId GetNext(const wxTreeItemId &item) const;
|
||||
|
|
|
|||
|
|
@ -578,6 +578,8 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||
|
||||
SetWindowStyleFlag(style);
|
||||
|
||||
Bind(wxEVT_KEY_DOWN, &wxTreeCtrl::OnKeyDown, this);
|
||||
|
||||
return QtCreateControl(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
|
|
@ -1420,3 +1422,14 @@ wxTreeItemId wxTreeCtrl::GetNext(const wxTreeItemId &item) const
|
|||
} while ( p.IsOk() && !toFind.IsOk() );
|
||||
return toFind;
|
||||
}
|
||||
|
||||
void wxTreeCtrl::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
// send a tree event
|
||||
wxTreeEvent te( wxEVT_TREE_KEY_DOWN, this);
|
||||
te.m_evtKey = event;
|
||||
if ( GetEventHandler()->ProcessEvent( te ) )
|
||||
return;
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue