Fix output name field not updating when toggling suffix checkbox
This commit is contained in:
parent
58c55d3bc6
commit
4f74d5b2b2
9
main.go
9
main.go
|
|
@ -6625,9 +6625,12 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
|
|
||||||
appendSuffixCheck := widget.NewCheck("Append \"-convert\" to filename", func(checked bool) {
|
appendSuffixCheck := widget.NewCheck("Append \"-convert\" to filename", func(checked bool) {
|
||||||
state.convert.AppendSuffix = checked
|
state.convert.AppendSuffix = checked
|
||||||
if !state.convert.UseAutoNaming {
|
// Recalculate and update the output base to reflect the suffix change
|
||||||
applyAutoName(false)
|
newBase := state.resolveOutputBase(src, !state.convert.UseAutoNaming)
|
||||||
}
|
updatingOutput = true
|
||||||
|
state.convert.OutputBase = newBase
|
||||||
|
outputEntry.SetText(newBase)
|
||||||
|
updatingOutput = false
|
||||||
// Update output hint to show the change immediately
|
// Update output hint to show the change immediately
|
||||||
if outputHint != nil {
|
if outputHint != nil {
|
||||||
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))
|
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user