From 560fda70a2a3543a5bf6b587fdaf4aa835bdf6e0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 12 Jul 2019 22:59:37 +0100 Subject: [PATCH] Update position before first mouse-move-event. Fixes: lp:1780426 * https://bugs.launchpad.net/kicad/+bug/1780426 --- pcbnew/tools/pcb_editor_control.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index 4ced3a7fb0..e32bf51d32 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -660,6 +660,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent ) { module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, module ); + m_toolMgr->RunAction( ACTIONS::refreshPreview ); } else if( aEvent.HasPosition() ) m_toolMgr->RunAction( PCB_ACTIONS::cursorClick ); @@ -750,7 +751,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent ) m_menu.ShowContextMenu( selection() ); } - else if( module && evt->IsMotion() ) + else if( module && ( evt->IsMotion() || evt->IsAction( &ACTIONS::refreshPreview ) ) ) { module->SetPosition( wxPoint( cursorPos.x, cursorPos.y ) ); selection().SetReferencePoint( cursorPos );