From 484c35c44f599e737d838b8a0d9fbf37ac53524b Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 16 May 2025 09:25:04 -0700 Subject: [PATCH] When cycling next/prev selection, keep only single We want to have only the current item in the selection rather than all of them (cherry picked from commit 62e11694927dda229c45ca0be8a135eb033d0717) --- eeschema/net_navigator.cpp | 1 + eeschema/tools/sch_selection_tool.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/eeschema/net_navigator.cpp b/eeschema/net_navigator.cpp index d165740738..98b12c7eec 100644 --- a/eeschema/net_navigator.cpp +++ b/eeschema/net_navigator.cpp @@ -445,6 +445,7 @@ const SCH_ITEM* SCH_EDIT_FRAME::SelectNextPrevNetNavigatorItem( bool aNext ) m_netNavigator->EnsureVisible( nextId ); } + m_netNavigator->UnselectAll(); m_netNavigator->SelectItem( nextId ); auto* data = static_cast( m_netNavigator->GetItemData( nextId ) ); diff --git a/eeschema/tools/sch_selection_tool.cpp b/eeschema/tools/sch_selection_tool.cpp index 53c14f331d..f9ec4128f5 100644 --- a/eeschema/tools/sch_selection_tool.cpp +++ b/eeschema/tools/sch_selection_tool.cpp @@ -3218,6 +3218,7 @@ int SCH_SELECTION_TOOL::SelectNext( const TOOL_EVENT& aEvent ) if( item ) { + ClearSelection(); select( const_cast( item ) ); m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); } @@ -3240,6 +3241,7 @@ int SCH_SELECTION_TOOL::SelectPrevious( const TOOL_EVENT& aEvent ) if( item ) { + ClearSelection(); select( const_cast( item ) ); m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); }