hedgewars/uCommandHandlers.pas
changeset 14701 d74517fdb34f
parent 14700 4eaeba349179
child 14702 bd43e703608b
--- 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);