浏览代码

feat: keep selected tool on canvas reset (#4728)

David Luzar 3 年之前
父节点
当前提交
050bc1ce2b
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/actions/actionCanvas.tsx

+ 2 - 0
src/actions/actionCanvas.tsx

@@ -65,6 +65,8 @@ export const actionClearCanvas = register({
         gridSize: appState.gridSize,
         showStats: appState.showStats,
         pasteDialog: appState.pasteDialog,
+        elementType:
+          appState.elementType === "image" ? "selection" : appState.elementType,
       },
       commitToHistory: true,
     };