Disable auto-name on manual output edit
This commit is contained in:
parent
5f161978de
commit
48108b9f75
9
main.go
9
main.go
|
|
@ -6151,10 +6151,17 @@ func buildConvertView(state *appState, src *videoSource) fyne.CanvasObject {
|
||||||
outputEntry := widget.NewEntry()
|
outputEntry := widget.NewEntry()
|
||||||
outputEntry.SetText(state.convert.OutputBase)
|
outputEntry.SetText(state.convert.OutputBase)
|
||||||
var updatingOutput bool
|
var updatingOutput bool
|
||||||
|
var autoNameCheck *widget.Check
|
||||||
outputEntry.OnChanged = func(val string) {
|
outputEntry.OnChanged = func(val string) {
|
||||||
if updatingOutput {
|
if updatingOutput {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if state.convert.UseAutoNaming {
|
||||||
|
state.convert.UseAutoNaming = false
|
||||||
|
if autoNameCheck != nil {
|
||||||
|
autoNameCheck.SetChecked(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
state.convert.OutputBase = val
|
state.convert.OutputBase = val
|
||||||
outputHint.SetText(fmt.Sprintf("Output file: %s", state.convert.OutputFile()))
|
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()))
|
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
|
state.convert.UseAutoNaming = checked
|
||||||
applyAutoName(true)
|
applyAutoName(true)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user