Schematic: make grabbing whole lines more intuitive
Selecting end and midpoint will select whole line. Some changes for orthogonal dragging made this worse than in 6.0. Improves, but does not fully resolve: https://gitlab.com/kicad/code/kicad/-/issues/10860
This commit is contained in:
parent
b1bd8421e0
commit
567168fffc
|
@ -122,6 +122,8 @@ public:
|
|||
VECTOR2I GetStartPoint() const { return m_start; }
|
||||
void SetStartPoint( const VECTOR2I& aPosition ) { m_start = aPosition; }
|
||||
|
||||
VECTOR2I GetMidPoint() const { return ( m_start + m_end ) / 2; }
|
||||
|
||||
VECTOR2I GetEndPoint() const { return m_end; }
|
||||
void SetEndPoint( const VECTOR2I& aPosition ) { m_end = aPosition; }
|
||||
|
||||
|
|
|
@ -1270,9 +1270,13 @@ bool EE_SELECTION_TOOL::selectMultiple()
|
|||
line->SetFlags( ENDPOINT );
|
||||
|
||||
// If no ends were selected, select whole line (both ends)
|
||||
if( !line->HasFlag( STARTPOINT ) && !line->HasFlag( ENDPOINT ) )
|
||||
// Also select both ends if the selection overlaps the midpoint
|
||||
if( ( !line->HasFlag( STARTPOINT ) && !line->HasFlag( ENDPOINT ) )
|
||||
|| selectionRect.Contains( line->GetMidPoint() ) )
|
||||
{
|
||||
line->SetFlags( STARTPOINT | ENDPOINT );
|
||||
}
|
||||
}
|
||||
|
||||
anyAdded = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue