diff --git a/pcbnew/tools/microwave_tool.cpp b/pcbnew/tools/microwave_tool.cpp index 644ed6ac92..59323b745c 100644 --- a/pcbnew/tools/microwave_tool.cpp +++ b/pcbnew/tools/microwave_tool.cpp @@ -295,6 +295,8 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent ) controls.ShowCursor( true ); controls.SetSnapping( true ); + controls.CaptureCursor( false ); + controls.SetAutoPan( false ); 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 // cancel the tool originSet = false; + controls.CaptureCursor( false ); + controls.SetAutoPan( false ); + view.SetVisible( &previewRect, false ); view.Update( &previewRect, KIGFX::GEOMETRY ); } @@ -326,7 +331,6 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent ) tpGeomMgr.SetEnd( cursorPos ); originSet = true; - controls.CaptureCursor( true ); controls.SetAutoPan( true ); } @@ -342,6 +346,8 @@ int MICROWAVE_TOOL::drawMicrowaveInductor( const TOOL_EVENT& aEvent ) // start again if needed originSet = false; + controls.CaptureCursor( false ); + controls.SetAutoPan( false ); view.SetVisible( &previewRect, false ); 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 ); frame.SetNoToolSelected();