Explorar o código

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

David Luzar %!s(int64=3) %!d(string=hai) anos
pai
achega
050bc1ce2b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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,
     };