Fix pcbnew cross probing ignoring the disabling of the cross probing zoom to fit setting

This commit is contained in:
Marek Roszko 2021-02-28 10:39:51 -05:00
parent 8a33542bcd
commit 4debfbcc53
1 changed files with 97 additions and 96 deletions

View File

@ -270,7 +270,8 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if( crossProbingSettings.center_on_items && bbox.GetWidth() > 0 && bbox.GetHeight() > 0 )
{
if( crossProbingSettings.zoom_to_fit )
{
//#define DEFAULT_PCBNEW_CODE // Un-comment for normal full zoom KiCad algorithm
#ifdef DEFAULT_PCBNEW_CODE
auto bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize();
@ -388,7 +389,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if( ( ratio < 0.5 || ratio > 1.0 ) || alwaysZoom )
view->SetScale( view->GetScale() / ratio );
#endif // ifndef DEFAULT_PCBNEW_CODE
}
view->SetCenter( bbox.Centre() );
}