pcbnew: Prevent aux axis after-image
Grid helper in the router tool is persistent, so remember to turn off
the aux axes after setting.
Fixes: lp:1822577
* https://bugs.launchpad.net/kicad/+bug/1822577
(cherry picked from commit 428e7a900b
)
This commit is contained in:
parent
4c94e2729f
commit
91ee809558
|
@ -54,6 +54,7 @@ using namespace std::placeholders;
|
|||
#include <tools/pcb_actions.h>
|
||||
#include <tools/selection_tool.h>
|
||||
#include <tools/edit_tool.h>
|
||||
#include <tools/grid_helper.h>
|
||||
#include <tools/tool_event_utils.h>
|
||||
|
||||
#include "router_tool.h"
|
||||
|
@ -1034,7 +1035,7 @@ void ROUTER_TOOL::performDragging( int aMode )
|
|||
highlightNet( true, m_startItem->Net() );
|
||||
|
||||
ctls->SetAutoPan( true );
|
||||
|
||||
m_gridHelper->SetAuxAxes( true, m_startSnapPoint, true );
|
||||
frame()->UndoRedoBlock( true );
|
||||
|
||||
while( OPT_TOOL_EVENT evt = Wait() )
|
||||
|
@ -1064,6 +1065,7 @@ void ROUTER_TOOL::performDragging( int aMode )
|
|||
|
||||
m_startItem = nullptr;
|
||||
|
||||
m_gridHelper->SetAuxAxes( false );
|
||||
frame()->UndoRedoBlock( false );
|
||||
ctls->SetAutoPan( false );
|
||||
ctls->ForceCursorPosition( false );
|
||||
|
@ -1175,14 +1177,15 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
VECTOR2I p0 = controls()->GetCursorPosition( false );
|
||||
|
||||
auto p = snapToItem( true, m_startItem, p0 );
|
||||
int dragMode = aEvent.Parameter<int64_t> ();
|
||||
|
||||
bool dragStarted = m_router->StartDragging( p0, m_startItem, dragMode );
|
||||
bool dragStarted = m_router->StartDragging( p, m_startItem, dragMode );
|
||||
|
||||
if( !dragStarted )
|
||||
return 0;
|
||||
|
||||
m_gridHelper->SetAuxAxes( true, p, true );
|
||||
controls()->ShowCursor( true );
|
||||
controls()->ForceCursorPosition( false );
|
||||
controls()->SetAutoPan( true );
|
||||
|
@ -1210,6 +1213,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
|||
if( m_router->RoutingInProgress() )
|
||||
m_router->StopRouting();
|
||||
|
||||
m_gridHelper->SetAuxAxes( false );
|
||||
controls()->SetAutoPan( false );
|
||||
controls()->ForceCursorPosition( false );
|
||||
frame()->UndoRedoBlock( false );
|
||||
|
|
Loading…
Reference in New Issue