From f2de3e9f67024a329d2cd6047d9522353289d49d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 30 Sep 2022 12:27:54 +0100 Subject: [PATCH] Minor cleanup. --- common/widgets/lib_tree.cpp | 12 ++---------- include/widgets/lib_tree.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 8b63de3f99..2266fcd3a3 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -134,11 +134,9 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T m_tree_ctrl->Bind( wxEVT_SIZE, &LIB_TREE::onSize, this ); m_tree_ctrl->Bind( wxEVT_DATAVIEW_ITEM_ACTIVATED, &LIB_TREE::onTreeActivate, this ); m_tree_ctrl->Bind( wxEVT_DATAVIEW_SELECTION_CHANGED, &LIB_TREE::onTreeSelect, this ); - m_tree_ctrl->Bind( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, &LIB_TREE::onItemContextMenu, + m_tree_ctrl->Bind( wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, &LIB_TREE::onItemContextMenu, this ); + m_tree_ctrl->Bind( wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, &LIB_TREE::onHeaderContextMenu, this ); - m_tree_ctrl->Bind( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, - &LIB_TREE::onHeaderContextMenu, this ); - m_tree_ctrl->Bind( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, &LIB_TREE::onHeaderClick, this ); Bind( SYMBOL_PRESELECTED, &LIB_TREE::onPreselect, this ); @@ -646,11 +644,5 @@ void LIB_TREE::onHeaderContextMenu( wxDataViewEvent& aEvent ) } -void LIB_TREE::onHeaderClick( wxDataViewEvent& aEvent ) -{ - -} - - wxDEFINE_EVENT( SYMBOL_PRESELECTED, wxCommandEvent ); wxDEFINE_EVENT( SYMBOL_SELECTED, wxCommandEvent ); diff --git a/include/widgets/lib_tree.h b/include/widgets/lib_tree.h index 57b09672e8..58b1709269 100644 --- a/include/widgets/lib_tree.h +++ b/include/widgets/lib_tree.h @@ -201,7 +201,6 @@ protected: void onDetailsLink( wxHtmlLinkEvent& aEvent ); void onPreselect( wxCommandEvent& aEvent ); void onItemContextMenu( wxDataViewEvent& aEvent ); - void onHeaderClick( wxDataViewEvent& aEvent ); void onHeaderContextMenu( wxDataViewEvent& aEvent ); void onDebounceTimer( wxTimerEvent& aEvent );