Skip to content

Commit

Permalink
WinGui: Fix an issue where the Preset Save button was corrupting / ov…
Browse files Browse the repository at this point in the history
…erwriting previously added presets. Fixes HandBrake#4804
  • Loading branch information
sr55 committed Jan 6, 2023
1 parent f95ff16 commit 3e9974c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Windows users, please make sure to install [Microsoft .NET Desktop Runtime versi
### Linux

- Updated Translations that were missed as part of 1.6.0 (#4790)
- Fixed an issue with QSV hardware detection on linux (#4768)

### Windows

Expand All @@ -22,6 +23,7 @@ Windows users, please make sure to install [Microsoft .NET Desktop Runtime versi
- Fixed an issue that broke the ARM64 Windows UI builds.
- Fixed an issue that prevented NVDEC from being available.
- Fixed an issue where passthru options would fallback to encoding erroneously (#4795)
- Fixed an issue with the Preset Save button incorrectly overwrote recently added presets (#4804)


## HandBrake 1.6.0
Expand Down
3 changes: 2 additions & 1 deletion win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public AddPresetViewModel(IPresetService presetService, IErrorService errorServi
this.CustomWidth = 0;
}

public Preset Preset { get; }
public Preset Preset { get; private set; }

public string PresetName => this.Preset.Name;

Expand Down Expand Up @@ -173,6 +173,7 @@ public PictureSettingsResLimitModes SelectedPictureSettingsResLimitMode

public void Setup(EncodeTask task, Title title, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
{
this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCategoryName };
this.Preset.Task = new EncodeTask(task);
this.Preset.AudioTrackBehaviours = new AudioBehaviours(audioBehaviours);
this.Preset.SubtitleTrackBehaviours = new SubtitleBehaviours(subtitleBehaviours);
Expand Down

0 comments on commit 3e9974c

Please sign in to comment.