When cycling next/prev selection, keep only single

We want to have only the current item in the selection rather than all
of them
This commit is contained in:
Seth Hillbrand 2025-05-16 09:25:04 -07:00
parent 6c09957799
commit 62e1169492
2 changed files with 3 additions and 0 deletions

View File

@ -445,6 +445,7 @@ const SCH_ITEM* SCH_EDIT_FRAME::SelectNextPrevNetNavigatorItem( bool aNext )
m_netNavigator->EnsureVisible( nextId ); m_netNavigator->EnsureVisible( nextId );
} }
m_netNavigator->UnselectAll();
m_netNavigator->SelectItem( nextId ); m_netNavigator->SelectItem( nextId );
NET_NAVIGATOR_ITEM_DATA* data = static_cast<NET_NAVIGATOR_ITEM_DATA*>( NET_NAVIGATOR_ITEM_DATA* data = static_cast<NET_NAVIGATOR_ITEM_DATA*>(

View File

@ -2845,6 +2845,7 @@ int SCH_SELECTION_TOOL::SelectNext( const TOOL_EVENT& aEvent )
if( item ) if( item )
{ {
ClearSelection();
select( const_cast<SCH_ITEM*>( item ) ); select( const_cast<SCH_ITEM*>( item ) );
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
} }
@ -2867,6 +2868,7 @@ int SCH_SELECTION_TOOL::SelectPrevious( const TOOL_EVENT& aEvent )
if( item ) if( item )
{ {
ClearSelection();
select( const_cast<SCH_ITEM*>( item ) ); select( const_cast<SCH_ITEM*>( item ) );
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
} }