Skip to content

Commit

Permalink
#4791 - System saves selection states of attachment point labels to K…
Browse files Browse the repository at this point in the history
…ET file (it should not) (#4832)
  • Loading branch information
Guch1g0v authored Jun 18, 2024
1 parent c11c8ad commit 73aadfb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
getPropertiesByImgFormat,
b64toBlob,
KetcherLogger,
Atom,
} from 'ketcher-core';

import { Dialog } from '../../../../components';
Expand Down Expand Up @@ -202,6 +203,11 @@ class SaveDialog extends Component {
const getStructFromStringByType = () => {
if (type === 'ket') {
const selection = this.props.editor.selection();
if (selection?.atoms?.length > 0) {
selection.atoms = selection.atoms.filter((selectedAtomId) => {
return !Atom.isSuperatomLeavingGroupAtom(struct, selectedAtomId);
});
}
return service.getStructureFromStructAsync(
struct,
undefined,
Expand Down

0 comments on commit 73aadfb

Please sign in to comment.