From 400364abebe3a0fb535f0eecac63d251c9fd9006 Mon Sep 17 00:00:00 2001 From: Vanda_Ponikarova Date: Mon, 1 May 2023 17:19:24 +0400 Subject: [PATCH] #2483 - Changed actions order in clear action --- packages/ketcher-react/src/script/ui/action/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ketcher-react/src/script/ui/action/index.js b/packages/ketcher-react/src/script/ui/action/index.js index 1875fee753..30bc76ae50 100644 --- a/packages/ketcher-react/src/script/ui/action/index.js +++ b/packages/ketcher-react/src/script/ui/action/index.js @@ -28,6 +28,7 @@ import help from './help' import functionalGroups from './functionalGroups' import fullscreen from './fullscreen' import { SettingsManager } from '../utils/settingsManager' +import { removeStructAction } from '../state/shared' export * from './action.types' @@ -38,12 +39,10 @@ const config = { action: { thunk: (dispatch, getState) => { const editor = getState().editor + + dispatch(removeStructAction()) + if (!editor.struct().isBlank()) editor.struct(null) - const savedSelectedTool = SettingsManager.selectionTool - dispatch({ - type: 'ACTION', - action: savedSelectedTool || tools['select-rectangle'].action - }) } }, hidden: (options) => isHidden(options, 'clear')