Skip to content

Commit

Permalink
Aegisub-Motion: trim settings: don't discard changes on dialog switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
torque committed May 28, 2015
1 parent 1da6711 commit 2fa9884
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions Aegisub-Motion.moon
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,19 @@ trimConfigDialog = ( options ) ->
while true
options\updateInterface "trim"
button, config = aegisub.dialog.display interface.trim, buttons[1], buttons[2]
switch button
when buttons[2].ok
-- only update encBin when the open dialog is shown.
config.encBin = nil
options\updateConfiguration config, "trim"
if button == buttons[2].ok or button == buttons[2].enc
-- only update encBin when the open dialog is shown.
config.encBin = nil
options\updateConfiguration config, "trim"
if button == buttons[2].ok
options\write!
break
when buttons[2].enc
else
encoder = aegisub.dialog.open "Choose an Encoding Binary", "", "", "", false, true
if encoder
options\updateConfiguration { encBin: encoder }, "trim"
else
aegisub.cancel!
else
aegisub.cancel!

trimConfigurator = ->
initializeInterface!
Expand All @@ -585,8 +585,8 @@ trimProcessor = ( subtitles, selectedLines, activeLine, eachFlag ) ->

stats = initStats!
options\read!
-- Check if encBin has been set.

-- Check if encBin has been set.
if options.configuration.trim.encBin == ""
interface.trim.pLabel.label = [[
You must specify the path to your encoding binary.
Expand Down
2 changes: 1 addition & 1 deletion VersionDetemplater.moon
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ versions = {
'src/Tags': '1.3.1'
'src/Transform': '1.2.4'
'src/TrimHandler': '1.0.3'
'Aegisub-Motion': '1.0.3'
'Aegisub-Motion': '1.0.4'
}
nameMap = {
CONFIGHANDLER: 'src/ConfigHandler'
Expand Down

0 comments on commit 2fa9884

Please sign in to comment.