Change behavior of ZOOM_FIT_ALL and ZOOM_FIT_OBJECTS for PCB_EDITOR

This commit is contained in:
Josue Huaroto 2023-09-03 19:58:28 +00:00 committed by Jeff Young
parent 60419f542a
commit 91d8dabca3
No known key found for this signature in database
1 changed files with 7 additions and 1 deletions

View File

@ -305,9 +305,15 @@ int COMMON_TOOLS::doZoomFit( ZOOM_FIT_TYPE_T aFitType )
// Currently "Zoom to Objects" is only supported in Eeschema & Pcbnew. Support for other
// programs in the suite can be added as needed.
if( aFitType == ZOOM_FIT_ALL )
{
if( frame->IsType( FRAME_PCB_EDITOR ) )
bBox = m_frame->GetDocumentExtents( false );
}
if( aFitType == ZOOM_FIT_OBJECTS )
{
if( frame->IsType( FRAME_SCH ) || frame->IsType( FRAME_PCB_EDITOR ) )
if( frame->IsType( FRAME_SCH ) )
bBox = m_frame->GetDocumentExtents( false );
else
aFitType = ZOOM_FIT_ALL; // Just do a "Zoom to Fit" for unsupported editors