← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Zoom to fit on empty canvas

 

Le 16/03/2017 à 09:57, John Beard a écrit :
> Hi,
> 
> Here's a small patch to add a bounding box method to the worksheet
> item, and use it to enable zoom to full sheet when the canvas is
> empty.
> 
> It's a rare thing to have an empty canvas, but it does annoy me when
> testing things on a blank slate, as the current behaviour is a bit
> wierd (zoom to bottom right-ish first, then to top left).
> 
> Cheers,
> 
> John

Hi John

At a first glance, I am thinking there is an issue in this kind of code:

bbox.SetEnd( { m_pageInfo->GetWidthMils() * 25400, m_pageInfo->GetHeightMils() * 25400 } );

looks to me like a bug: it expects the internal unit is 1 nanometer.
It is true only for pcbnew, but not for others applications.

Therefore it is a potential bug (bug for Eeschema, Gerbview and page layout editor)

Every code in GAL that assumes the internal unit is 1 nanometer works only for Pcbnew.

-- 
Jean-Pierre CHARRAS


Follow ups

References