fix duplicate mousewheel events

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2022-12-15 22:36:41 -03:00
parent 065b3062a6
commit 5872f2c3a4

View file

@ -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) {