Drag preselected items even when "prefer selection to dragging" enabled

Not being able to drag an already-selected item feels broken
This commit is contained in:
Jon Evans 2020-09-30 20:11:24 -04:00 committed by Seth Hillbrand
parent 1eb423830e
commit d530e2c2cd
2 changed files with 4 additions and 2 deletions

View File

@ -375,7 +375,8 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
if( auto schframe = dynamic_cast<SCH_EDIT_FRAME*>( 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();
}

View File

@ -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();
}