Do not warp viewport when dragging FPs
Fixes: lp:1714611 * https://bugs.launchpad.net/kicad/+bug/1714611
This commit is contained in:
parent
427e5ec461
commit
da037027fb
|
@ -443,10 +443,10 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition( bool aEnableSnapping ) const
|
|||
}
|
||||
|
||||
|
||||
void WX_VIEW_CONTROLS::SetCursorPosition( const VECTOR2D& aPosition )
|
||||
void WX_VIEW_CONTROLS::SetCursorPosition( const VECTOR2D& aPosition, bool aWarpView )
|
||||
{
|
||||
m_updateCursor = false;
|
||||
WarpCursor( aPosition, true, true );
|
||||
WarpCursor( aPosition, true, aWarpView );
|
||||
m_cursorPos = aPosition;
|
||||
}
|
||||
|
||||
|
|
|
@ -210,8 +210,9 @@ public:
|
|||
* forced and will be overridden with the next mouse motion event. Mouse cursor follows the
|
||||
* world cursor.
|
||||
* @param aPosition is the requested cursor position in the world coordinates.
|
||||
* @param aWarpView enables/disables view warp if the cursor is outside the current viewport.
|
||||
*/
|
||||
virtual void SetCursorPosition( const VECTOR2D& aPosition ) = 0;
|
||||
virtual void SetCursorPosition( const VECTOR2D& aPosition, bool aWarpView = true ) = 0;
|
||||
|
||||
/**
|
||||
* Function ForcedCursorPosition()
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
/// @copydoc VIEW_CONTROLS::GetCursorPosition()
|
||||
VECTOR2D GetCursorPosition( bool aSnappingEnabled ) const override;
|
||||
|
||||
void SetCursorPosition( const VECTOR2D& aPosition ) override;
|
||||
void SetCursorPosition( const VECTOR2D& aPosition, bool warpView ) override;
|
||||
|
||||
/// @copydoc VIEW_CONTROLS::CursorWarp()
|
||||
void WarpCursor( const VECTOR2D& aPosition, bool aWorldCoordinates = false,
|
||||
|
|
|
@ -442,7 +442,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
m_cursor = grid.Align( m_cursor );
|
||||
}
|
||||
|
||||
controls->SetCursorPosition( m_cursor );
|
||||
controls->SetCursorPosition( m_cursor, false );
|
||||
|
||||
VECTOR2I o = VECTOR2I( curr_item->GetPosition() );
|
||||
m_offset.x = o.x - m_cursor.x;
|
||||
|
|
Loading…
Reference in New Issue