From 81f84748b3c79d7e6fc21b6aa9e9e1ea5fc102d8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 10:43:19 +0100 Subject: [PATCH] Modifiers (Shift/Ctrl/Alt) are set also while moving the mouse cursor. --- common/tool/tool_dispatcher.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 49ab4382ac..916730d042 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -208,6 +208,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // but changes in world coordinates (eg. autopanning) type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { + wxMouseEvent* me = static_cast( &aEvent ); + int mods = decodeModifiers( me ); + VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); @@ -222,7 +225,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( !buttonEvents && motion ) { - evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION, mods ); evt->SetMousePosition( pos ); } }