From 83ae3f39c6844a6549250399418fc90c6e51c771 Mon Sep 17 00:00:00 2001 From: Timofey Alyakin Date: Wed, 25 Jan 2023 04:15:33 +0100 Subject: [PATCH] #2033 - one more place to restore saved selection tool --- packages/ketcher-react/src/script/ui/state/shared.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ketcher-react/src/script/ui/state/shared.ts b/packages/ketcher-react/src/script/ui/state/shared.ts index 1df8dbbe12..24a7b154d6 100644 --- a/packages/ketcher-react/src/script/ui/state/shared.ts +++ b/packages/ketcher-react/src/script/ui/state/shared.ts @@ -27,6 +27,7 @@ import { import { supportedSGroupTypes } from './constants' import { setAnalyzingFile } from './request' import tools from '../action/tools' +import { SettingsManager } from '../utils/settingsManager' export function onAction(action) { if (action && action.dialog) { @@ -142,9 +143,10 @@ export function load(struct: Struct, options?) { if (fragment) { if (parsedStruct.isBlank()) { + const savedSelectedTool = SettingsManager.selectionTool dispatch({ type: 'ACTION', - action: tools['select-rectangle'].action + action: savedSelectedTool || tools['select-rectangle'].action }) } else { dispatch(onAction({ tool: 'paste', opts: parsedStruct }))