From a63341864cad6b12fcb265da73a6a49d4042f314 Mon Sep 17 00:00:00 2001 From: Dmytro Vasin Date: Sun, 29 Sep 2024 13:57:35 +0200 Subject: [PATCH] Reset store on update + Small changes --- src/main/index.js | 5 ++--- src/renderer/components/Application.js | 1 + src/renderer/components/components/ToolBar.js | 4 ++-- src/renderer/components/components/drawer/figures.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 6b4d0f6..301ebe4 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -80,7 +80,7 @@ function updateContextMenu() { { label: 'Update and Restart', click: () => { - store.set('new_version_released', false) + store.clear() autoUpdater.quitAndInstall() } } @@ -360,9 +360,8 @@ function showDrawWindow() { } function hideDrawWindow() { - mainWindow.hide() - resetScreen() + mainWindow.hide() foregroundMode = false updateContextMenu() // Need to rerender the context menu diff --git a/src/renderer/components/Application.js b/src/renderer/components/Application.js index 8aa9d69..f5ae2a0 100644 --- a/src/renderer/components/Application.js +++ b/src/renderer/components/Application.js @@ -393,6 +393,7 @@ const Application = (settings) => { setActiveFigureInfo(null); setAllFigures([]); + setLaserFigure([]); }; const handleToggleToolbar = () => { diff --git a/src/renderer/components/components/ToolBar.js b/src/renderer/components/components/ToolBar.js index 33ebdae..45fbccb 100644 --- a/src/renderer/components/components/ToolBar.js +++ b/src/renderer/components/components/ToolBar.js @@ -229,8 +229,8 @@ const ToolBar = ({ -
-
+
+
diff --git a/src/renderer/components/components/drawer/figures.js b/src/renderer/components/components/drawer/figures.js index d64e293..5dcf6f6 100644 --- a/src/renderer/components/components/drawer/figures.js +++ b/src/renderer/components/components/drawer/figures.js @@ -49,7 +49,7 @@ const createGradient = (ctx, pointA, pointB, rainbowColorDeg, updateRainbowColor } const activeColorAndWidth = () => { - return ['#FFF', 1] + return ['#FFF', 2] } const detectColorAndWidth = (ctx, pointA, pointB, colorIndex, widthIndex, rainbowColorDeg, updateRainbowColorDeg) => {