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).
This commit is contained in:
Baranovskiy Konstantin 2018-05-30 16:37:27 +03:00 committed by Maciej Suminski
parent d03e92a3a2
commit 36504b3071
2 changed files with 9 additions and 0 deletions

View File

@ -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();

View File

@ -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();