Browse Source

Request redraw of 3D-Viewer when moving a footprint

pull/16/head
Mario Luzeiro 5 years ago
committed by Jon Evans
parent
commit
456112de03
  1. 8
      pcbnew/tools/edit_tool.cpp

8
pcbnew/tools/edit_tool.cpp

@ -418,6 +418,8 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference )
{
if( m_dragging && evt->Category() == TC_MOUSE )
{
bool requestRedraw3Dview = false;
VECTOR2I mousePos( controls->GetMousePosition() );
m_cursor = grid.BestSnapAnchor( mousePos, item_layers, sel_items );
@ -450,8 +452,14 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference )
// group and not its descendants.
if( !item->GetParent() || !item->GetParent()->IsSelected() )
static_cast<BOARD_ITEM*>( item )->Move( movement );
if( item->Type() == PCB_MODULE_T )
requestRedraw3Dview = true;
}
if( requestRedraw3Dview )
editFrame->Redraw3Dview();
m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved );
}
else if( !m_dragging && !evt->IsAction( &ACTIONS::refreshPreview ) )

Loading…
Cancel
Save