X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;fp=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=fb0cdd6788300fbd08c7b8a73ee31d8418fb247d;hb=03fa86e6dc495f9444ae14dad401b1ad6de793fe;hp=1266f241653cc662e1e792d0297656977a30c807;hpb=0e16112661802284c0d2c9eb8d1df84141125e91;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 1266f241..fb0cdd67 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -3085,7 +3085,9 @@ int CWindowCanvas::test_zoom(int &redraw) if( EQUIV(zoom, my_zoom_table[idx]) ) continue; if( zoom < my_zoom_table[idx] ) break; } - zoom = idx < total_zooms ? my_zoom_table[idx] : 1.1 * zoom; + float zoom11 = 1.1f * zoom; + zoom = idx < total_zooms ? my_zoom_table[idx] : zoom11; + if( zoom > zoom11 ) zoom = zoom11; break; } case WHEEL_DOWN: { int idx = total_zooms; @@ -3093,7 +3095,9 @@ int CWindowCanvas::test_zoom(int &redraw) if( EQUIV(my_zoom_table[idx], zoom) ) continue; if( my_zoom_table[idx] < zoom ) break; } - zoom = idx >= 0 ? my_zoom_table[idx] : 0.9 * zoom; + float zoom09 = 0.9f * zoom; + zoom = idx >= 0 ? my_zoom_table[idx] : zoom09; + if( zoom < zoom09 ) zoom = zoom09; break; } case MIDDLE_BUTTON: if( gui->shift_down() ) { @@ -3259,7 +3263,7 @@ int CWindowCanvas::button_press_event() break; case CWINDOW_ZOOM: - test_zoom(redraw); + result = test_zoom(redraw); break; case CWINDOW_CROP: