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
9b50b94069
commit
ded64aef3d
|
@ -295,6 +295,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 );
|
||||||
|
|
||||||
|
@ -314,6 +316,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 );
|
||||||
}
|
}
|
||||||
|
@ -326,7 +331,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 );
|
||||||
}
|
}
|
||||||
|
@ -342,6 +346,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 );
|
||||||
|
@ -365,6 +371,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