# HG changeset patch # User Wuzzy # Date 1549332590 -3600 # Node ID d74517fdb34f536a39abeec2ac729f56586d5c8c # Parent 4eaeba3491799fb063ed4cd3f249c99514bdad99 Properly enforce zoom bounds again when changing zoom diff -r 4eaeba349179 -r d74517fdb34f hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Tue Feb 05 02:46:41 2019 +0100 +++ b/hedgewars/uCommandHandlers.pas Tue Feb 05 03:09:50 2019 +0100 @@ -732,21 +732,23 @@ procedure chZoomIn(var s: shortstring); begin s:= s; // avoid compiler hint - if ZoomValue < cMinZoomLevel then - if (LocalMessage and gmPrecise <> 0) then - ZoomValue:= ZoomValue + cZoomDeltaSmall - else - ZoomValue:= ZoomValue + cZoomDelta; + if (LocalMessage and gmPrecise <> 0) then + ZoomValue:= ZoomValue + cZoomDeltaSmall + else + ZoomValue:= ZoomValue + cZoomDelta; + if ZoomValue > cMinZoomLevel then + ZoomValue:= cMinZoomLevel; end; procedure chZoomOut(var s: shortstring); begin s:= s; // avoid compiler hint - if ZoomValue > cMaxZoomLevel then - if (LocalMessage and gmPrecise <> 0) then - ZoomValue:= ZoomValue - cZoomDeltaSmall - else - ZoomValue:= ZoomValue - cZoomDelta; + if (LocalMessage and gmPrecise <> 0) then + ZoomValue:= ZoomValue - cZoomDeltaSmall + else + ZoomValue:= ZoomValue - cZoomDelta; + if ZoomValue < cMaxZoomLevel then + ZoomValue:= cMaxZoomLevel; end; procedure chZoomReset(var s: shortstring);