Fix output name field not updating when toggling suffix checkbox

This commit is contained in:
Stu Leak 2025-12-30 16:20:20 -05:00
parent 58c55d3bc6
commit 4f74d5b2b2

View File

@ -6625,9 +6625,12 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
appendSuffixCheck := widget.NewCheck("Append \"-convert\" to filename", func(checked bool) {
state.convert.AppendSuffix = checked
if !state.convert.UseAutoNaming {
applyAutoName(false)
}
// Recalculate and update the output base to reflect the suffix change
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
if outputHint != nil {
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))