From 828c9c4d658759c80da05566cf12075398b605d0 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Thu, 14 May 2020 14:51:33 +0200 Subject: [PATCH] use commitToHistory prop for handling draw history (#1595) --- src/actions/actionFinalize.tsx | 2 +- src/components/App.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/actions/actionFinalize.tsx b/src/actions/actionFinalize.tsx index 429731cdc..eb7f9d07b 100644 --- a/src/actions/actionFinalize.tsx +++ b/src/actions/actionFinalize.tsx @@ -89,7 +89,7 @@ export const actionFinalize = register({ } : appState.selectedElementIds, }, - commitToHistory: false, + commitToHistory: appState.elementType === "draw", }; }, keyTest: (event, appState) => diff --git a/src/components/App.tsx b/src/components/App.tsx index 8ccf60baf..bc1aa50da 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -2340,7 +2340,6 @@ class App extends React.Component { if (draggingElement?.type === "draw") { this.actionManager.executeAction(actionFinalize); - history.resumeRecording(); return; } if (isLinearElement(draggingElement)) {