diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 805bea19cf..cbd32f4408 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -517,6 +517,7 @@ void PCB_SELECTION_TOOL::EnterGroup() select( titem ); } ); + view()->Hide( m_enteredGroup, true ); m_enteredGroupOverlay.Add( m_enteredGroup ); view()->Update( &m_enteredGroupOverlay ); } @@ -529,6 +530,7 @@ void PCB_SELECTION_TOOL::ExitGroup( bool aSelectGroup ) return; m_enteredGroup->ClearFlags( ENTERED ); + view()->Hide( m_enteredGroup, false ); ClearSelection(); if( aSelectGroup ) diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index 1f43a4b2d3..041cf2b469 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -639,8 +639,23 @@ void ZONE::Move( const VECTOR2I& offset ) HatchBorder(); + /* move fills */ for( std::pair>& pair : m_FilledPolysList ) pair.second->Move( offset ); + + /* + * move boundingbox cache + * + * While the cache will get nuked at the conclusion of the operation, we use it for some + * things (such as drawing the parent group) during the move. + */ + if( GetBoard() ) + { + auto it = GetBoard()->m_ZoneBBoxCache.find( this ); + + if( it != GetBoard()->m_ZoneBBoxCache.end() ) + it->second.Move( offset ); + } }