Sfoglia il codice sorgente

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

David Luzar 3 anni fa
parent
commit
050bc1ce2b
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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,
     };