From 78fee4fa8435f751a2ee679f99a3bc3b6f0c7178 Mon Sep 17 00:00:00 2001 From: Metachs <123@example.org> Date: Sun, 25 Aug 2024 17:09:35 -0400 Subject: [PATCH] Reset state before Ctrl-A shortcuts to avoid deleted currently selected content --- js/ui/tool/select.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/tool/select.js b/js/ui/tool/select.js index 855c2e1..8a95e6a 100644 --- a/js/ui/tool/select.js +++ b/js/ui/tool/select.js @@ -557,6 +557,7 @@ const selectTransformTool = () => // Register Ctrl-A Shortcut state.ctrlacb = () => { + state.reset(false); // Reset to preserve selected content try { const {bb} = cropCanvas(uil.canvas); select(bb); @@ -566,6 +567,8 @@ const selectTransformTool = () => }; state.ctrlsacb = () => { + state.reset(false); // Reset to preserve selected content + // Shift Key selects based on all visible layer information const tl = {x: Infinity, y: Infinity}; const br = {x: -Infinity, y: -Infinity};