Apply fix from 5.1 branch.

Fixes: lp:1834111
* https://bugs.launchpad.net/kicad/+bug/1834111
This commit is contained in:
Jeff Young 2019-07-05 02:57:39 +01:00
parent a9c66e15ea
commit f20335cefe
1 changed files with 5 additions and 1 deletions

View File

@ -298,6 +298,9 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
TOOL_EVENT* evt = const_cast<TOOL_EVENT*>( &aEvent ); TOOL_EVENT* evt = const_cast<TOOL_EVENT*>( &aEvent );
VECTOR2I prevPos; VECTOR2I prevPos;
// Prime the pump
m_toolMgr->RunAction( ACTIONS::refreshPreview );
// Main loop: keep receiving events // Main loop: keep receiving events
do do
{ {
@ -349,6 +352,8 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
if( lockFlags == SELECTION_LOCKED ) if( lockFlags == SELECTION_LOCKED )
break; break;
m_dragging = true;
// When editing modules, all items have the same parent // When editing modules, all items have the same parent
if( EditingModules() ) if( EditingModules() )
{ {
@ -407,7 +412,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
prevPos = m_cursor; prevPos = m_cursor;
controls->SetAutoPan( true ); controls->SetAutoPan( true );
m_dragging = true;
} }
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified ); m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );