Loading common/tool/tool_manager.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -594,6 +594,8 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent ) // Temporarily store the cursor position, so the tools could execute actions // using the point where the user has invoked a context menu bool forcedCursor = m_viewControls->IsCursorPositionForced(); VECTOR2D cursorPos = m_viewControls->GetCursorPosition(); m_viewControls->ForceCursorPosition( true, m_viewControls->GetCursorPosition() ); // Run update handlers Loading @@ -609,7 +611,7 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent ) dispatchInternal( evt ); } m_viewControls->ForceCursorPosition( false ); m_viewControls->ForceCursorPosition( forcedCursor, cursorPos ); break; } Loading include/view/view_controls.h +5 −1 Original line number Diff line number Diff line Loading @@ -152,7 +152,6 @@ public: */ virtual VECTOR2D GetCursorPosition() const = 0; /** * Function ForceCursorPosition() * Places the cursor immediately at a given point. Mouse movement is ignored. Loading Loading @@ -182,6 +181,11 @@ public: m_cursorCaptured = aEnabled; } inline bool IsCursorPositionForced() const { return m_forceCursorPosition; } protected: /// Sets center for VIEW, takes into account panning boundaries. void setCenter( const VECTOR2D& aCenter ); Loading Loading
common/tool/tool_manager.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -594,6 +594,8 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent ) // Temporarily store the cursor position, so the tools could execute actions // using the point where the user has invoked a context menu bool forcedCursor = m_viewControls->IsCursorPositionForced(); VECTOR2D cursorPos = m_viewControls->GetCursorPosition(); m_viewControls->ForceCursorPosition( true, m_viewControls->GetCursorPosition() ); // Run update handlers Loading @@ -609,7 +611,7 @@ void TOOL_MANAGER::dispatchContextMenu( const TOOL_EVENT& aEvent ) dispatchInternal( evt ); } m_viewControls->ForceCursorPosition( false ); m_viewControls->ForceCursorPosition( forcedCursor, cursorPos ); break; } Loading
include/view/view_controls.h +5 −1 Original line number Diff line number Diff line Loading @@ -152,7 +152,6 @@ public: */ virtual VECTOR2D GetCursorPosition() const = 0; /** * Function ForceCursorPosition() * Places the cursor immediately at a given point. Mouse movement is ignored. Loading Loading @@ -182,6 +181,11 @@ public: m_cursorCaptured = aEnabled; } inline bool IsCursorPositionForced() const { return m_forceCursorPosition; } protected: /// Sets center for VIEW, takes into account panning boundaries. void setCenter( const VECTOR2D& aCenter ); Loading