From 7cf9e468d530cbf57021822cf66e8b3401a448b2 Mon Sep 17 00:00:00 2001 From: tim h Date: Sun, 18 Dec 2022 20:35:48 -0600 Subject: [PATCH] fixes synced resolution changing undesirably with some tools on scrollwheel --- js/ui/tool/colorbrush.js | 1 + js/ui/tool/interrogate.js | 1 + js/ui/tool/maskbrush.js | 1 + js/ui/tool/select.js | 1 + js/ui/tool/stamp.js | 1 + 5 files changed, 5 insertions(+) diff --git a/js/ui/tool/colorbrush.js b/js/ui/tool/colorbrush.js index b576b18..01b4cbb 100644 --- a/js/ui/tool/colorbrush.js +++ b/js/ui/tool/colorbrush.js @@ -138,6 +138,7 @@ const colorBrushTool = () => state.brushBlur = 0; state.brushOpacity = 1; state.affectMask = true; + state.block_res_change = true; state.setBrushSize = (size) => { state.brushSize = size; state.ctxmenu.brushSizeRange.value = size; diff --git a/js/ui/tool/interrogate.js b/js/ui/tool/interrogate.js index f39528f..4224645 100644 --- a/js/ui/tool/interrogate.js +++ b/js/ui/tool/interrogate.js @@ -34,6 +34,7 @@ const interrogateTool = () => state.snapToGrid = true; state.invertMask = false; state.overMaskPx = 0; + state.block_res_change = true; state.erasePrevReticle = () => ovLayer.clear(); diff --git a/js/ui/tool/maskbrush.js b/js/ui/tool/maskbrush.js index 35da787..9649cde 100644 --- a/js/ui/tool/maskbrush.js +++ b/js/ui/tool/maskbrush.js @@ -109,6 +109,7 @@ const maskBrushTool = () => state.brushSize = 64; state.brushBlur = 0; state.brushOpacity = 1; + state.block_res_change = true; state.setBrushSize = (size) => { state.brushSize = size; state.ctxmenu.brushSizeRange.value = size; diff --git a/js/ui/tool/select.js b/js/ui/tool/select.js index d7c7e92..0e41726 100644 --- a/js/ui/tool/select.js +++ b/js/ui/tool/select.js @@ -57,6 +57,7 @@ const selectTransformTool = () => state.snapToGrid = true; state.keepAspectRatio = true; + state.block_res_change = true; state.useClipboard = !!( navigator.clipboard && navigator.clipboard.write ); // Use it by default if supported diff --git a/js/ui/tool/stamp.js b/js/ui/tool/stamp.js index 9f45c08..1189bb3 100644 --- a/js/ui/tool/stamp.js +++ b/js/ui/tool/stamp.js @@ -58,6 +58,7 @@ const stampTool = () => state.back = null; state.lastMouseMove = {x: 0, y: 0}; + state.block_res_change = true; state.selectResource = (resource, nolock = true) => { if (nolock && state.ctxmenu.uploadButton.disabled) return;