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();
|
BOX2I bbox = unobscuredPoly.BBox();
|
||||||
int step = std::min( bbox.GetWidth(), bbox.GetHeight() ) / 10;
|
int step = std::min( bbox.GetWidth(), bbox.GetHeight() ) / 10;
|
||||||
|
|
||||||
|
if( step < 20 )
|
||||||
|
step = 20;
|
||||||
|
|
||||||
while( !unobscuredPoly.IsEmpty() )
|
while( !unobscuredPoly.IsEmpty() )
|
||||||
{
|
{
|
||||||
unobscuredCenter = unobscuredPoly.BBox().Centre();
|
unobscuredCenter = unobscuredPoly.BBox().Centre();
|
||||||
|
|
Loading…
Reference in New Issue