From ea0edaba217dd652ef2c2585fac3e63f30e1c2f1 Mon Sep 17 00:00:00 2001 From: Thomas Figueroa Date: Fri, 5 Jul 2019 15:22:16 -0500 Subject: [PATCH] Fix cursor lag in canvases on Windows. Fixes: lp:1831541 * https://bugs.launchpad.net/kicad/+bug/1831541 --- common/tool/tool_manager.cpp | 2 +- include/tool/tool_event.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 93fd69e994..7323d8d653 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -966,7 +966,7 @@ void TOOL_MANAGER::UpdateUI( const TOOL_EVENT& aEvent ) { frame->UpdateStatusBar(); - if( !aEvent.IsMotion() ) + if( !aEvent.IsMouseAction() ) frame->SyncToolbars(); } } diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 16ffd22972..4e78818759 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -298,6 +298,11 @@ public: return m_actions == TA_MOUSE_MOTION; } + bool IsMouseAction() const + { + return m_actions && TA_MOUSE; + } + bool IsCancel() const { return m_actions == TA_CANCEL_TOOL;