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 )
|
else if( !m_selection.GetBoundingBox().Inflate( grid.GetGrid().x, grid.GetGrid().y )
|
||||||
.Contains( evt->Position() ) )
|
.Contains( evt->Position() ) )
|
||||||
{
|
{
|
||||||
EE_SELECTION saved_selection = m_selection;
|
EE_COLLECTOR collector;
|
||||||
|
|
||||||
for( EDA_ITEM* item : saved_selection )
|
if( CollectHits( collector, evt->Position(), { SCH_LOCATE_ANY_T } ) )
|
||||||
RemoveItemFromSel( item, true );
|
|
||||||
|
|
||||||
SelectPoint( evt->Position(), { SCH_LOCATE_ANY_T }, nullptr, &selCancelled );
|
|
||||||
|
|
||||||
if( m_selection.Empty() )
|
|
||||||
{
|
{
|
||||||
m_selection.SetIsHover( false );
|
ClearSelection();
|
||||||
|
|
||||||
for( EDA_ITEM* item : saved_selection )
|
SelectPoint( evt->Position(), { SCH_LOCATE_ANY_T }, nullptr, &selCancelled );
|
||||||
AddItemToSel( item, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_selection.SetIsHover( true );
|
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 )
|
int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
EE_SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
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();
|
SCHEMATIC& schematic = m_frame->Schematic();
|
||||||
SCH_SCREEN* screen = m_frame->GetCurrentSheet().LastScreen();
|
SCH_SCREEN* screen = m_frame->GetCurrentSheet().LastScreen();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue