mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Don't take too long worrying about very small exposed areas.
(And in particular, don't take forever if the min / 10 results in step being 0.)
This commit is contained in:
parent
58df9c96f4
commit
b285545aee
@ -622,6 +622,9 @@ void VIEW::SetCenter( const VECTOR2D& aCenter, const std::vector<BOX2D>& obscuri
|
||||
BOX2I bbox = unobscuredPoly.BBox();
|
||||
int step = std::min( bbox.GetWidth(), bbox.GetHeight() ) / 10;
|
||||
|
||||
if( step < 20 )
|
||||
step = 20;
|
||||
|
||||
while( !unobscuredPoly.IsEmpty() )
|
||||
{
|
||||
unobscuredCenter = unobscuredPoly.BBox().Centre();
|
||||
|
Loading…
Reference in New Issue
Block a user