pcbnew: Control cursor capture in microwave tool
Turns off cursor capture when the microwave tool is not actively drawing a new inductor. Fixes: lp:1792128 * https://bugs.launchpad.net/kicad/+bug/1792128
This commit is contained in:
parent
a149960faa
commit
61715a8df5
|
@ -313,6 +313,8 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
controls.ShowCursor( true );
|
controls.ShowCursor( true );
|
||||||
controls.SetSnapping( true );
|
controls.SetSnapping( true );
|
||||||
|
controls.CaptureCursor( false );
|
||||||
|
controls.SetAutoPan( false );
|
||||||
|
|
||||||
view.Add( &previewRect );
|
view.Add( &previewRect );
|
||||||
|
|
||||||
|
@ -332,6 +334,9 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent )
|
||||||
// had an in-progress area, so start again but don't
|
// had an in-progress area, so start again but don't
|
||||||
// cancel the tool
|
// cancel the tool
|
||||||
originSet = false;
|
originSet = false;
|
||||||
|
controls.CaptureCursor( false );
|
||||||
|
controls.SetAutoPan( false );
|
||||||
|
|
||||||
view.SetVisible( &previewRect, false );
|
view.SetVisible( &previewRect, false );
|
||||||
view.Update( &previewRect, KIGFX::GEOMETRY );
|
view.Update( &previewRect, KIGFX::GEOMETRY );
|
||||||
}
|
}
|
||||||
|
@ -344,7 +349,6 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent )
|
||||||
tpGeomMgr.SetEnd( cursorPos );
|
tpGeomMgr.SetEnd( cursorPos );
|
||||||
|
|
||||||
originSet = true;
|
originSet = true;
|
||||||
|
|
||||||
controls.CaptureCursor( true );
|
controls.CaptureCursor( true );
|
||||||
controls.SetAutoPan( true );
|
controls.SetAutoPan( true );
|
||||||
}
|
}
|
||||||
|
@ -360,6 +364,8 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
// start again if needed
|
// start again if needed
|
||||||
originSet = false;
|
originSet = false;
|
||||||
|
controls.CaptureCursor( false );
|
||||||
|
controls.SetAutoPan( false );
|
||||||
|
|
||||||
view.SetVisible( &previewRect, false );
|
view.SetVisible( &previewRect, false );
|
||||||
view.Update( &previewRect, KIGFX::GEOMETRY );
|
view.Update( &previewRect, KIGFX::GEOMETRY );
|
||||||
|
@ -383,6 +389,8 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
controls.CaptureCursor( false );
|
||||||
|
controls.SetAutoPan( false );
|
||||||
view.Remove( &previewRect );
|
view.Remove( &previewRect );
|
||||||
|
|
||||||
frame.SetNoToolSelected();
|
frame.SetNoToolSelected();
|
||||||
|
|
Loading…
Reference in New Issue