Symbol Editor: Don't unselect library based on non-existent symbol

FIXED: Previously, when the symbol editor frame gains focus it will
unselect the library tree selection unconditionally. This is annoying
when adding a new library and then new symbol to a freshly-opened symbol
editor with no other symbol being edited. Anything that gives the editor
focus will deselect your library before you can add a symbol to it.
This commit is contained in:
Mike Williams 2021-07-19 12:59:49 -04:00 committed by Wayne Stambaugh
parent 36b2ff262d
commit 924d4563b7
1 changed files with 4 additions and 1 deletions

View File

@ -79,6 +79,9 @@ void SYMBOL_TREE_PANE::onUpdateUI( wxUpdateUIEvent& aEvent )
{
// Don't allow a selected item in the tree when the canvas has focus: it's too easy
// to confuse the selected-highlighting with the being-edited-on-canvas-highlighting.
m_tree->Unselect();
if( m_symbolEditFrame->GetCurSymbol() != nullptr )
{
m_tree->Unselect();
}
}
}