From 56e0031e035494dc30d948078b04aee8f16537ce Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 4 Jan 2019 13:10:34 +0100 Subject: [PATCH] Fix incorrect onScroll handler on GAL mode. If a Scroll event is skipped, a default handler is fired by wxWidgets. This default default handler fires 3 wxEVT_SCROLLWIN_LINEUP or wxEVT_SCROLLWIN_LINEDOWN events. This is not wanted now in eeschema (and pcbnew) because they add extra (unwanted) scrolling. Fixes: lp:1810403 https://bugs.launchpad.net/kicad/+bug/1810403 --- common/view/wx_view_controls.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 889a5f571b..4935f7fc9f 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -213,7 +213,10 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) } } - aEvent.Skip(); + // Do not skip this event, otherwise wxWidgets will fire + // 3 wxEVT_SCROLLWIN_LINEUP or wxEVT_SCROLLWIN_LINEDOWN (normal wxWidgets behavior) + // and we do not want that. + m_parentPanel->Refresh(); }