From d530e2c2cd82e3af35a336bbc36f5e2b8295db12 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 30 Sep 2020 20:11:24 -0400 Subject: [PATCH] Drag preselected items even when "prefer selection to dragging" enabled Not being able to drag an already-selected item feels broken --- eeschema/tools/ee_selection_tool.cpp | 3 ++- pcbnew/tools/selection_tool.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 7f09bf43b0..2c40ef6b58 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -375,7 +375,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) if( auto schframe = dynamic_cast( m_frame ) ) schframe->FocusOnItem( nullptr ); - if( m_additive || m_subtractive || m_exclusive_or || m_frame->GetDragSelects() ) + if( m_additive || m_subtractive || m_exclusive_or || + ( m_selection.Empty() && m_frame->GetDragSelects() ) ) { selectMultiple(); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index c6dba7b83a..3304920992 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -289,7 +289,8 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) { m_frame->FocusOnItem( nullptr ); - if( m_additive || m_subtractive || m_exclusive_or || dragAlwaysSelects ) + if( m_additive || m_subtractive || m_exclusive_or || + ( m_selection.Empty() && dragAlwaysSelects ) ) { selectMultiple(); }