Fixed Bug 1829931: calculation of zoom level in Window_Zoom(), so we show more rather than less for a box-zoom.
This commit is contained in:
parent
9039a0a579
commit
48858c30c4
|
@ -130,8 +130,9 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
|
||||||
/* Compute the best zoom */
|
/* Compute the best zoom */
|
||||||
Rect.Normalize();
|
Rect.Normalize();
|
||||||
size = DrawPanel->GetClientSize();
|
size = DrawPanel->GetClientSize();
|
||||||
ii = Rect.GetSize().x / size.x;
|
// Overestimate zoom level, i. e. show more than selected rather than less.
|
||||||
jj = Rect.GetSize().y / size.y;
|
ii = static_cast<int>( ceil(1.0 * Rect.GetSize().x / size.x) );
|
||||||
|
jj = static_cast<int>( ceil(1.0 * Rect.GetSize().y / size.y) );
|
||||||
bestzoom = MAX( ii, jj );
|
bestzoom = MAX( ii, jj );
|
||||||
if( bestzoom <= 0 )
|
if( bestzoom <= 0 )
|
||||||
bestzoom = 1;
|
bestzoom = 1;
|
||||||
|
|
Loading…
Reference in New Issue