diff options
author | 0neGal <mail@0negal.com> | 2022-02-17 23:07:18 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-02-17 23:07:18 +0100 |
commit | ee7dab5b056e254bff828a9b9f6d77be2287b935 (patch) | |
tree | 8a46abebb7886c206c679dada52e4d1af849cd0f /src/index.js | |
parent | c38abb7e16b8e59fb12f78df75f0de30e10946db (diff) | |
download | Viper-ee7dab5b056e254bff828a9b9f6d77be2287b935.tar.gz Viper-ee7dab5b056e254bff828a9b9f6d77be2287b935.zip |
fixed buttons not re-enabling when closing install
If you closed the file selection window after clicking the "Install Mod"
button it would improperly try to install "nothing", and therefore never
re-enable the buttons, this is now fixed.
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index a06cf69..344ac6c 100644 --- a/src/index.js +++ b/src/index.js @@ -76,7 +76,11 @@ ipcMain.on("installmod", () => { utils.mods.install(cli.param("installmod")) } else { dialog.showOpenDialog({properties: ["openFile"]}).then(res => { - utils.mods.install(res.filePaths[0]); + if (res.filePaths.length != 0) { + utils.mods.install(res.filePaths[0]); + } else { + win.webContents.send("setbuttons", true); + } }).catch(err => {console.error(err)}) } }) |