router: Match segment endpoint calculation between dragger and the tool.
Prevents always picking point A when dragging short segments.
This commit is contained in:
parent
7abfa46531
commit
e8f755c665
|
@ -124,14 +124,12 @@ bool DRAGGER::startDragSegment( const VECTOR2D& aP, SEGMENT* aSeg )
|
|||
auto distA = ( aP - aSeg->Seg().A ).EuclideanNorm();
|
||||
auto distB = ( aP - aSeg->Seg().B ).EuclideanNorm();
|
||||
|
||||
if( distA <= w2 )
|
||||
if( distA < w2 || distB < w2 )
|
||||
{
|
||||
m_mode = DM_CORNER;
|
||||
}
|
||||
else if( distB <= w2 )
|
||||
{
|
||||
|
||||
if( distB <= distA )
|
||||
m_draggedSegmentIndex++;
|
||||
m_mode = DM_CORNER;
|
||||
}
|
||||
else if( m_freeAngleMode )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue