From a5d1016b43fd9cbc99bb1f57f5e033c1c829d7f3 Mon Sep 17 00:00:00 2001 From: Rehili Ghazwa Date: Wed, 18 Dec 2024 20:28:17 +0100 Subject: [PATCH] block as few actions as possible when deleting modification --- .../graph/menus/network-modification-node-editor.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/graph/menus/network-modification-node-editor.tsx b/src/components/graph/menus/network-modification-node-editor.tsx index 580df331d3..97e237a708 100644 --- a/src/components/graph/menus/network-modification-node-editor.tsx +++ b/src/components/graph/menus/network-modification-node-editor.tsx @@ -925,7 +925,7 @@ const NetworkModificationNodeEditor = () => { getItemId={(val) => val.uuid} getItemLabel={getModificationLabel} isDndDragAndDropActive - isDragDisable={isLoading() || isAnyNodeBuilding || mapDataLoading || deleteInProgress} + isDragDisable={isLoading() || isAnyNodeBuilding || mapDataLoading} secondaryAction={handleSecondaryAction} onDragEnd={commit} onDragStart={() => setIsDragging(true)} @@ -1030,7 +1030,7 @@ const NetworkModificationNodeEditor = () => { size={'small'} ref={buttonAddRef} onClick={openNetworkModificationConfiguration} - disabled={isAnyNodeBuilding || mapDataLoading || deleteInProgress} + disabled={isAnyNodeBuilding || mapDataLoading} > @@ -1040,7 +1040,7 @@ const NetworkModificationNodeEditor = () => { onClick={openImportModificationsDialog} size={'small'} sx={styles.toolbarIcon} - disabled={isAnyNodeBuilding || mapDataLoading || deleteInProgress} + disabled={isAnyNodeBuilding || mapDataLoading} > @@ -1091,11 +1091,7 @@ const NetworkModificationNodeEditor = () => { size={'small'} sx={styles.toolbarIcon} disabled={ - !(copiedModifications.length > 0) || - isAnyNodeBuilding || - mapDataLoading || - deleteInProgress || - !currentNode + !(copiedModifications.length > 0) || isAnyNodeBuilding || mapDataLoading || !currentNode } >