From e2e2d171bf456c928907bccc6e8383cb6b2faccf Mon Sep 17 00:00:00 2001 From: Nikita Chistousov Date: Wed, 16 Oct 2024 03:21:51 +0200 Subject: [PATCH] =?UTF-8?q?Backmerge:=20#5665=20=E2=80=93=20Show=20remove?= =?UTF-8?q?=20abbreviation=20dialog=20when=20trying=20to=20erase=20expande?= =?UTF-8?q?d=20monomer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ketcher-react/src/script/editor/tool/eraser.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ketcher-react/src/script/editor/tool/eraser.ts b/packages/ketcher-react/src/script/editor/tool/eraser.ts index 1ed1864023..a5e0ab4e5a 100644 --- a/packages/ketcher-react/src/script/editor/tool/eraser.ts +++ b/packages/ketcher-react/src/script/editor/tool/eraser.ts @@ -30,6 +30,7 @@ import { IMAGE_KEY, MULTITAIL_ARROW_KEY, fromMultitailArrowDeletion, + MonomerMicromolecule, } from 'ketcher-core'; import LassoHelper from './helper/lasso'; @@ -359,7 +360,10 @@ class EraserTool implements Tool { } else if (ci.map === 'sgroups' || ci.map === 'sgroupData') { const sGroup = sgroups.get(ci.id); - if (FunctionalGroup.isFunctionalGroup(sGroup?.item)) { + if ( + FunctionalGroup.isFunctionalGroup(sGroup?.item) || + sGroup?.item instanceof MonomerMicromolecule + ) { this.editor.event.removeFG.dispatch({ fgIds: [ci.id] }); } else { this.editor.update(fromSgroupDeletion(restruct, ci.id));