From 1c6fd1fb1afdc1c4bedc29eb8c97ebb568b5543a Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Tue, 6 Dec 2022 22:06:30 -0300 Subject: [PATCH] fix maskbrush stationary cursor wheel rendering brush did not redraw when changing brush size. now it does Signed-off-by: Victor Seiji Hariki --- js/ui/tool/maskbrush.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/ui/tool/maskbrush.js b/js/ui/tool/maskbrush.js index d3993e4..90dad73 100644 --- a/js/ui/tool/maskbrush.js +++ b/js/ui/tool/maskbrush.js @@ -155,12 +155,23 @@ const maskBrushTool = () => uiCtx.fill(); }; + state.redraw = () => { + state.movecb({ + ...mouse.coords.world.pos, + evn: { + clientX: mouse.coords.window.pos.x, + clientY: mouse.coords.window.pos.y, + }, + }); + }; + state.wheelcb = (evn) => { if (!evn.evn.ctrlKey) { state.brushSize = state.setBrushSize( state.brushSize - Math.floor(state.config.brushScrollSpeed * evn.delta) ); + state.redraw(); } };