From 344111d53cb031d62ecd1f55b5a5e8cdc2a955f5 Mon Sep 17 00:00:00 2001 From: guchigow Date: Sat, 29 Jun 2024 21:23:10 +0500 Subject: [PATCH] #4927 - Able to change attachment point label to an atom if it is selected first --- packages/ketcher-react/src/script/editor/tool/atom.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ketcher-react/src/script/editor/tool/atom.ts b/packages/ketcher-react/src/script/editor/tool/atom.ts index 73f400a86c..a89422bb6f 100644 --- a/packages/ketcher-react/src/script/editor/tool/atom.ts +++ b/packages/ketcher-react/src/script/editor/tool/atom.ts @@ -64,7 +64,11 @@ class AtomTool implements Tool { const updatedAtoms = editorSelection?.atoms?.filter( (selectAtomId) => !deletedAtomsInSGroups?.includes(selectAtomId) && - struct.atoms.has(selectAtomId), + struct.atoms.has(selectAtomId) && + !Atom.isSuperatomLeavingGroupAtom( + this.editor.render.ctab.molecule, + selectAtomId, + ), ); action.mergeWith(fromAtomsAttrs(struct, updatedAtoms, atomProps, true)); editor.update(action);