Skip to content

Commit 2fa9884

Browse files
committed
Aegisub-Motion: trim settings: don't discard changes on dialog switch.
1 parent 1da6711 commit 2fa9884

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

Aegisub-Motion.moon

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -556,19 +556,19 @@ trimConfigDialog = ( options ) ->
556556
while true
557557
options\updateInterface "trim"
558558
button, config = aegisub.dialog.display interface.trim, buttons[1], buttons[2]
559-
switch button
560-
when buttons[2].ok
561-
-- only update encBin when the open dialog is shown.
562-
config.encBin = nil
563-
options\updateConfiguration config, "trim"
559+
if button == buttons[2].ok or button == buttons[2].enc
560+
-- only update encBin when the open dialog is shown.
561+
config.encBin = nil
562+
options\updateConfiguration config, "trim"
563+
if button == buttons[2].ok
564564
options\write!
565565
break
566-
when buttons[2].enc
566+
else
567567
encoder = aegisub.dialog.open "Choose an Encoding Binary", "", "", "", false, true
568568
if encoder
569569
options\updateConfiguration { encBin: encoder }, "trim"
570-
else
571-
aegisub.cancel!
570+
else
571+
aegisub.cancel!
572572

573573
trimConfigurator = ->
574574
initializeInterface!
@@ -585,8 +585,8 @@ trimProcessor = ( subtitles, selectedLines, activeLine, eachFlag ) ->
585585

586586
stats = initStats!
587587
options\read!
588-
-- Check if encBin has been set.
589588

589+
-- Check if encBin has been set.
590590
if options.configuration.trim.encBin == ""
591591
interface.trim.pLabel.label = [[
592592
You must specify the path to your encoding binary.

VersionDetemplater.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ versions = {
1212
'src/Tags': '1.3.1'
1313
'src/Transform': '1.2.4'
1414
'src/TrimHandler': '1.0.3'
15-
'Aegisub-Motion': '1.0.3'
15+
'Aegisub-Motion': '1.0.4'
1616
}
1717
nameMap = {
1818
CONFIGHANDLER: 'src/ConfigHandler'

0 commit comments

Comments
 (0)