From 7081be7f5e9b84e4096e1d1643ee9de3ff17dc9c Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 29 Dec 2024 17:03:18 +0000 Subject: [PATCH] WinGui: Fix an issue with the autoname function not updating when title is the only option. Fixes #6517 --- win/CS/HandBrakeWPF/Model/ChangedOption.cs | 3 ++- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/win/CS/HandBrakeWPF/Model/ChangedOption.cs b/win/CS/HandBrakeWPF/Model/ChangedOption.cs index 2596facc6662..33415f766fae 100644 --- a/win/CS/HandBrakeWPF/Model/ChangedOption.cs +++ b/win/CS/HandBrakeWPF/Model/ChangedOption.cs @@ -16,6 +16,7 @@ public enum ChangedOption Dimensions, Source, Preset, - Angle + Angle, + Title } } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index bd9714c58884..8e545cd0fc77 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2221,7 +2221,7 @@ private void TriggerAutonameChange(ChangedOption option) bool is_execute = false; - if ((autonameFormat.Contains(Constants.Source) || autonameFormat.Contains(Constants.SourcePath) || autonameFormat.Contains(Constants.SourceFolderName)) && option == ChangedOption.Source) + if ((autonameFormat.Contains(Constants.Source) || autonameFormat.Contains(Constants.SourcePath) || autonameFormat.Contains(Constants.SourceFolderName) || autonameFormat.Contains(Constants.Title)) && option == ChangedOption.Source) { is_execute = true; } @@ -2270,7 +2270,7 @@ private void TriggerAutonameChange(ChangedOption option) { is_execute = true; } - + if (is_execute) { this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SelectedTitle?.DisplaySourceName, this.SelectedTitle?.DisplaySourceName, this.selectedPreset);