Attempt to fix hierarchy tree selection issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16670
This commit is contained in:
parent
13935399a5
commit
5c4313587b
|
@ -247,8 +247,15 @@ void HIERARCHY_PANE::UpdateHierarchyTree()
|
|||
void HIERARCHY_PANE::onSelectSheetPath( wxTreeEvent& aEvent )
|
||||
{
|
||||
wxTreeItemId itemSel = m_tree->GetSelection();
|
||||
|
||||
if( !itemSel.IsOk() )
|
||||
return;
|
||||
|
||||
TREE_ITEM_DATA* itemData = static_cast<TREE_ITEM_DATA*>( m_tree->GetItemData( itemSel ) );
|
||||
|
||||
if( !itemData )
|
||||
return;
|
||||
|
||||
SetCursor( wxCURSOR_ARROWWAIT );
|
||||
m_frame->GetToolManager()->RunAction<SCH_SHEET_PATH*>( EE_ACTIONS::changeSheet,
|
||||
&itemData->m_SheetPath );
|
||||
|
@ -258,7 +265,7 @@ void HIERARCHY_PANE::onSelectSheetPath( wxTreeEvent& aEvent )
|
|||
|
||||
void HIERARCHY_PANE::onRightClick( wxTreeEvent& aEvent )
|
||||
{
|
||||
wxTreeItemId itemSel = m_tree->GetFocusedItem();
|
||||
wxTreeItemId itemSel = m_tree->GetSelection();
|
||||
|
||||
if( !itemSel.IsOk() )
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue