Button "Toggle the search tree" from left toolbar of Symbol Library Editor does not show actual state of visibility of the search tree panel. State of this button (checked or unchecked) changes on clicking only. Toggling panel visibility from menu does not make effect on tool state.
Attached patch makes tool state (checkd/unchecked) synced with panel state (shown/hidden).
From 67e3963b4cfecc1aef31cc41140d0fbe61531adc Mon Sep 17 00:00:00 2001 From: Baranovskiy Konstantin <baranovskiykonstan...@gmail.com> Date: Wed, 30 May 2018 16:37:27 +0300 Subject: [PATCH] SymLibEditor: synced state of search tree tool button with its panel Button "Toggle the search tree" from left toolbar of Symbol Library Editor does not show actual state of visibility of the search tree panel. State of this button (checked or unchecked) changes on clicking only. Toggling panel visibility from menu does not make effect on tool state. Applied changes makes tool state (checkd/unchecked) synced with panel state (shown/hidden). --- eeschema/lib_edit_frame.cpp | 8 ++++++++ eeschema/lib_edit_frame.h | 1 + 2 files changed, 9 insertions(+) diff --git a/eeschema/lib_edit_frame.cpp b/eeschema/lib_edit_frame.cpp index 617acf2c4..83cfe58b6 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 eb27bf705..f496b3fca 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(); -- 2.17.0
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp