From 2fd9b23c1ae7347fd59fa1b6e6c9fd5ec33c8040 Mon Sep 17 00:00:00 2001 From: aproskurnov Date: Fri, 11 Oct 2024 11:32:19 +0200 Subject: [PATCH] #5672 Multiple duplicate items when ctrl pressed (#5720) (#5723) * change rendering of highlights * fixed macromolecule tests * fixed indigo-tools tests * fixed part bonds tests * fixed bonds tests * fixed rotation tests * fixed layout tests * fixed functional group tests * bunch of tests * bunch of tests * fixed bunch of tests * fixed test snapshot * fix snapshot * fixed bunch of tests * update test file * rollback redundant changes * revert changes isCopy * fixed multiple duplicating issue --------- Co-authored-by: Aleksei Proskurnov --- packages/ketcher-react/src/script/editor/tool/select/select.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ketcher-react/src/script/editor/tool/select/select.ts b/packages/ketcher-react/src/script/editor/tool/select/select.ts index 8475b97035..c52138ce3a 100644 --- a/packages/ketcher-react/src/script/editor/tool/select/select.ts +++ b/packages/ketcher-react/src/script/editor/tool/select/select.ts @@ -155,7 +155,7 @@ class SelectTool implements Tool { }; } - if (!ci || ci.map === 'atoms') { + if (!ci || (ci.map === 'atoms' && !event.ctrlKey)) { atomLongtapEvent(this, rnd); } @@ -346,6 +346,7 @@ class SelectTool implements Tool { return; } this.isMouseDown = false; + this.isReadyForCopy = false; const editor = this.editor; const selected = editor.selection();