From 5872f2c3a4eaec274957af8d9059d5e09afe3694 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Thu, 15 Dec 2022 22:36:41 -0300 Subject: [PATCH] fix duplicate mousewheel events Signed-off-by: Victor Seiji Hariki --- js/ui/tool/dream.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index 4237096..590c7ef 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -1032,8 +1032,6 @@ const dreamTool = () => mouse.listen.world.onmousemove.on(state.mousemovecb); mouse.listen.world.onwheel.on(state.wheelcb); - mouse.listen.world.onmousemove.on(state.mousemovecb); - mouse.listen.world.onwheel.on(state.wheelcb); mouse.listen.world.btn.left.onclick.on(state.dreamcb); mouse.listen.world.btn.right.onclick.on(state.erasecb); @@ -1493,6 +1491,7 @@ const img2imgTool = () => state.sdreamcb = (evn, estate) => { if (selection.exists && !selection.inside) { selection.deselect(); + state.redraw(); estate.selection_processed = true; } if (selection.inside) {