From 0f026bbe1dcc2e0228411646038eeebcb9952af9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Feb 2014 17:29:13 +0100 Subject: [PATCH] Fixed snapping item in a wrong spot bug. --- common/view/wx_view_controls.cpp | 2 +- include/view/view_controls.h | 2 +- include/view/wx_view_controls.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index f9a17fa86a..48107911d2 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -229,7 +229,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) { - m_grabMouse = aEnabled; + VIEW_CONTROLS::SetGrabMouse( aEnabled ); if( aEnabled ) m_parentPanel->CaptureMouse(); diff --git a/include/view/view_controls.h b/include/view/view_controls.h index a51048dca3..5ec1a037a4 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -60,7 +60,7 @@ public: * * @param aEnabled says whether the opion should be enabled or disabled. */ - void SetSnapping( bool aEnabled ) + virtual void SetSnapping( bool aEnabled ) { m_snappingEnabled = aEnabled; } diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 5df48f3de3..41540e951b 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -58,6 +58,13 @@ public: void onEnter( wxMouseEvent& WXUNUSED( aEvent ) ); void onTimer( wxTimerEvent& WXUNUSED( aEvent ) ); + ///> @copydoc VIEW_CONTROLS::SetSnapping() + void SetSnapping( bool aEnabled ) + { + VIEW_CONTROLS::SetSnapping( aEnabled ); + updateCursor(); + } + /** * Function SetGrabMouse() * Enables/disables mouse cursor grabbing (limits the movement field only to the panel area).