Pcbnew: Fix incorrect position of the graphic crosshairs cursor in H,V,45deg
forced mode, when the graphic polygon tool is active, but a graphic item is not started. (The code was using the last created point, but it does not exist before starting a line) Fixes #6079 https://gitlab.com/kicad/code/kicad/issues/6079
This commit is contained in:
parent
c092e3f8b7
commit
f74ffc5623
|
@ -1418,8 +1418,8 @@ bool DRAWING_TOOL::drawSegment( const std::string& aTool, int aShape, PCB_SHAPE*
|
|||
else if( evt->IsMotion() )
|
||||
{
|
||||
// 45 degree lines
|
||||
if( ( limit45 && aShape == S_SEGMENT )
|
||||
|| ( evt->Modifier( MD_CTRL ) && aShape == S_RECT ) )
|
||||
if( started && ( ( limit45 && aShape == S_SEGMENT )
|
||||
|| ( evt->Modifier( MD_CTRL ) && aShape == S_RECT ) ) )
|
||||
{
|
||||
const VECTOR2I lineVector( cursorPos - VECTOR2I( twoPointManager.GetOrigin() ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue