Cross-probing: Do not center/zoom on empty BBox
This commit is contained in:
parent
419010ec46
commit
e9ffea83fd
|
@ -1575,12 +1575,15 @@ void PCB_SELECTION_TOOL::doSyncSelection( const std::vector<BOARD_ITEM*>& aItems
|
||||||
|
|
||||||
EDA_RECT bbox = m_selection.GetBoundingBox();
|
EDA_RECT bbox = m_selection.GetBoundingBox();
|
||||||
|
|
||||||
if( m_frame->Settings().m_CrossProbing.center_on_items )
|
if( bbox.GetWidth() > 0 && bbox.GetHeight() > 0 )
|
||||||
{
|
{
|
||||||
if( m_frame->Settings().m_CrossProbing.zoom_to_fit )
|
if( m_frame->Settings().m_CrossProbing.center_on_items )
|
||||||
zoomFitCrossProbeBBox( bbox );
|
{
|
||||||
|
if( m_frame->Settings().m_CrossProbing.zoom_to_fit )
|
||||||
|
zoomFitCrossProbeBBox( bbox );
|
||||||
|
|
||||||
m_frame->FocusOnLocation( bbox.Centre() );
|
m_frame->FocusOnLocation( bbox.Centre() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view()->UpdateAllLayersColor();
|
view()->UpdateAllLayersColor();
|
||||||
|
|
Loading…
Reference in New Issue