Skip to content

Commit

Permalink
WinGui: Fix an issue with the autoname function not updating when tit…
Browse files Browse the repository at this point in the history
…le is the only option. Fixes HandBrake#6517
  • Loading branch information
sr55 committed Dec 29, 2024
1 parent cab6cd5 commit 7081be7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion win/CS/HandBrakeWPF/Model/ChangedOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum ChangedOption
Dimensions,
Source,
Preset,
Angle
Angle,
Title
}
}
4 changes: 2 additions & 2 deletions win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7081be7

Please sign in to comment.