Disable auto-name on manual output edit

This commit is contained in:
Stu Leak 2025-12-24 03:07:54 -05:00
parent d566a085d1
commit 804d27a0b5

View File

@ -6151,10 +6151,17 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
outputEntry := widget.NewEntry()
outputEntry.SetText(state.convert.OutputBase)
var updatingOutput bool
var autoNameCheck *widget.Check
outputEntry.OnChanged = func(val string) {
if updatingOutput {
return
}
if state.convert.UseAutoNaming {
state.convert.UseAutoNaming = false
if autoNameCheck != nil {
autoNameCheck.SetChecked(false)
}
}
state.convert.OutputBase = val
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))
}
@ -6171,7 +6178,7 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))
}
autoNameCheck := widget.NewCheck("Auto-name from metadata", func(checked bool) {
autoNameCheck = widget.NewCheck("Auto-name from metadata", func(checked bool) {
state.convert.UseAutoNaming = checked
applyAutoName(true)
})