From 7f132ca2613931492484ef6691810ad9496cba2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Fri, 12 Oct 2018 23:19:26 +0200 Subject: [PATCH] EDA_DRAW_FRAME: avoid cursor flickering in GAL when changing cursor size Fixes: lp:1797437 --- common/legacy_gal/eda_draw_frame.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/legacy_gal/eda_draw_frame.cpp b/common/legacy_gal/eda_draw_frame.cpp index 0df3d7107f..2befd25907 100644 --- a/common/legacy_gal/eda_draw_frame.cpp +++ b/common/legacy_gal/eda_draw_frame.cpp @@ -409,12 +409,11 @@ void EDA_DRAW_FRAME::OnToggleCrossHairStyle( wxCommandEvent& aEvent ) { auto& galOpts = GetGalDisplayOptions(); galOpts.m_fullscreenCursor = !galOpts.m_fullscreenCursor; + galOpts.NotifyChanged(); - auto canvas = GetCanvas(); - - canvas->CrossHairOff( ); - canvas->CrossHairOn( ); + // make sure the cursor is redrawn + GetCanvas()->Refresh(); }