Reset state before Ctrl-A shortcuts to avoid deleted currently selected content
This commit is contained in:
parent
a8f208eda4
commit
78fee4fa84
1 changed files with 3 additions and 0 deletions
|
@ -557,6 +557,7 @@ const selectTransformTool = () =>
|
||||||
|
|
||||||
// Register Ctrl-A Shortcut
|
// Register Ctrl-A Shortcut
|
||||||
state.ctrlacb = () => {
|
state.ctrlacb = () => {
|
||||||
|
state.reset(false); // Reset to preserve selected content
|
||||||
try {
|
try {
|
||||||
const {bb} = cropCanvas(uil.canvas);
|
const {bb} = cropCanvas(uil.canvas);
|
||||||
select(bb);
|
select(bb);
|
||||||
|
@ -566,6 +567,8 @@ const selectTransformTool = () =>
|
||||||
};
|
};
|
||||||
|
|
||||||
state.ctrlsacb = () => {
|
state.ctrlsacb = () => {
|
||||||
|
state.reset(false); // Reset to preserve selected content
|
||||||
|
|
||||||
// Shift Key selects based on all visible layer information
|
// Shift Key selects based on all visible layer information
|
||||||
const tl = {x: Infinity, y: Infinity};
|
const tl = {x: Infinity, y: Infinity};
|
||||||
const br = {x: -Infinity, y: -Infinity};
|
const br = {x: -Infinity, y: -Infinity};
|
||||||
|
|
Loading…
Reference in a new issue