Schematic: don't deselect line ends when right clicking off-selection
This commit is contained in:
parent
8b7d0d71fb
commit
9b782fa827
|
@ -435,22 +435,13 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
else if( !m_selection.GetBoundingBox().Inflate( grid.GetGrid().x, grid.GetGrid().y )
|
||||
.Contains( evt->Position() ) )
|
||||
{
|
||||
EE_SELECTION saved_selection = m_selection;
|
||||
EE_COLLECTOR collector;
|
||||
|
||||
for( EDA_ITEM* item : saved_selection )
|
||||
RemoveItemFromSel( item, true );
|
||||
|
||||
SelectPoint( evt->Position(), { SCH_LOCATE_ANY_T }, nullptr, &selCancelled );
|
||||
|
||||
if( m_selection.Empty() )
|
||||
if( CollectHits( collector, evt->Position(), { SCH_LOCATE_ANY_T } ) )
|
||||
{
|
||||
m_selection.SetIsHover( false );
|
||||
ClearSelection();
|
||||
|
||||
for( EDA_ITEM* item : saved_selection )
|
||||
AddItemToSel( item, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectPoint( evt->Position(), { SCH_LOCATE_ANY_T }, nullptr, &selCancelled );
|
||||
m_selection.SetIsHover( true );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1175,8 +1175,6 @@ int SCH_EDITOR_CONTROL::ClearHighlight( const TOOL_EVENT& aEvent )
|
|||
int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
EE_SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
KIGFX::VIEW_CONTROLS* controls = getViewControls();
|
||||
VECTOR2D cursorPos = controls->GetCursorPosition( !aEvent.DisableGridSnapping() );
|
||||
SCHEMATIC& schematic = m_frame->Schematic();
|
||||
SCH_SCREEN* screen = m_frame->GetCurrentSheet().LastScreen();
|
||||
|
||||
|
|
Loading…
Reference in New Issue