diff --git a/eeschema/lib_edit_frame.cpp b/eeschema/lib_edit_frame.cpp index 617acf2c49..83cfe58b60 100644 --- a/eeschema/lib_edit_frame.cpp +++ b/eeschema/lib_edit_frame.cpp @@ -199,6 +199,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_UPDATE_UI_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT, LIB_EDIT_FRAME::OnUpdateEditingPart ) EVT_UPDATE_UI( ID_LIBEDIT_SHOW_ELECTRICAL_TYPE, LIB_EDIT_FRAME::OnUpdateElectricalType ) + EVT_UPDATE_UI( ID_LIBEDIT_SHOW_HIDE_SEARCH_TREE, LIB_EDIT_FRAME::OnUpdateSearchTreeTool ) END_EVENT_TABLE() @@ -489,6 +490,13 @@ void LIB_EDIT_FRAME::OnUpdateElectricalType( wxUpdateUIEvent& aEvent ) } +void LIB_EDIT_FRAME::OnUpdateSearchTreeTool( wxUpdateUIEvent& aEvent ) +{ + if( aEvent.GetEventObject() == m_optionsToolBar ) + aEvent.Check( IsSearchTreeShown() ); +} + + void LIB_EDIT_FRAME::OnUpdateEditingPart( wxUpdateUIEvent& aEvent ) { LIB_PART* part = GetCurPart(); diff --git a/eeschema/lib_edit_frame.h b/eeschema/lib_edit_frame.h index eb27bf7053..f496b3fcab 100644 --- a/eeschema/lib_edit_frame.h +++ b/eeschema/lib_edit_frame.h @@ -351,6 +351,7 @@ public: void OnUpdateDeMorganConvert( wxUpdateUIEvent& event ); void OnUpdateSelectAlias( wxUpdateUIEvent& event ); void OnUpdateElectricalType( wxUpdateUIEvent& aEvent ); + void OnUpdateSearchTreeTool( wxUpdateUIEvent& aEvent ); void UpdateAliasSelectList(); void UpdatePartSelectList();