Skip to content

Commit 8cd51bc

Browse files
committed
Fixed issue where cropping changes to Custom could sometimes pull in values from the preset, which could change them when they should not be.
1 parent bdf2359 commit 8cd51bc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

VidCoder/ViewModel/Panels/SizingPanelViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public SizingPanelViewModel(EncodingWindowViewModel encodingWindowViewModel)
212212
this.UpdateProfileProperty(
213213
() => this.Profile.Cropping,
214214
nameof(this.Profile.Cropping.Top),
215-
nameof(this.CropTop),
215+
nameof(this.CropTop),
216216
cropTop,
217217
raisePropertyChanged: false);
218218
});
@@ -286,7 +286,7 @@ public SizingPanelViewModel(EncodingWindowViewModel encodingWindowViewModel)
286286
this.PresetsService.WhenAnyValue(x => x.SelectedPreset.Preset.EncodingProfile)
287287
.Subscribe(_ =>
288288
{
289-
if (this.PresetsService.SelectedPreset.Preset.EncodingProfile.CroppingType == VCCroppingType.Custom)
289+
if (this.PresetsService.SelectedPreset.Preset.EncodingProfile.CroppingType == VCCroppingType.Custom && !this.PresetsService.MarkingPresetModified)
290290
{
291291
bool oldAutoValue = this.AutomaticChange;
292292
this.AutomaticChange = true;
@@ -382,6 +382,7 @@ public SizingPanelViewModel(EncodingWindowViewModel encodingWindowViewModel)
382382
}
383383
else if (x.sizingMode == VCSizingMode.Automatic && x.paddingMode != VCPaddingMode.Custom)
384384
{
385+
this.AutomaticChange = true;
385386
if (x.selectedTitle == null)
386387
{
387388
this.PadTop = 0;

0 commit comments

Comments
 (0)