Skip to content

Commit

Permalink
fix output default value not load config bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zmcx16 committed Jun 6, 2020
1 parent 191cb53 commit 8875b0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions gui/public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,5 +480,6 @@ ipc.on('exportEffects', (event, data) => {

ipc.on('saveConfig', (event, data) => {
let ret = saveDataSync(CONFIG_FILE_NAME, data)
config = Object.assign({}, data)
event.returnValue = ret
})
2 changes: 1 addition & 1 deletion gui/src/components/output/jpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function JPEG({ configRef }) {
<FormattedMessage id={"setting.output.jpeg.quality"} />
</Typography>
<Slider
defaultValue={75}
defaultValue={outputRef.current.quality}
getAriaValueText={(value) => { return value }}
aria-labelledby={"quality-slider"}
valueLabelDisplay="auto"
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/output/png.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function PNG({ configRef }) {
<FormattedMessage id={"setting.output.png.compress_level"} />
</Typography>
<Slider
defaultValue={75}
defaultValue={outputRef.current.compress_level}
getAriaValueText={(value) => { return value }}
aria-labelledby={"compress_level-slider"}
valueLabelDisplay="auto"
Expand Down

0 comments on commit 8875b0c

Please sign in to comment.