From 9601f22a6f01bd3a17b344a0dc86dc36ada13492 Mon Sep 17 00:00:00 2001 From: BinaryConstruct Date: Wed, 3 Jul 2024 16:02:06 -0500 Subject: [PATCH] Fix missing RaisePropertyChanged events (#1904) Fixes #1901 --- src/TEdit.Terraria/World.Properties.cs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/TEdit.Terraria/World.Properties.cs b/src/TEdit.Terraria/World.Properties.cs index 49b7a6f2..fb672e41 100644 --- a/src/TEdit.Terraria/World.Properties.cs +++ b/src/TEdit.Terraria/World.Properties.cs @@ -5,6 +5,7 @@ using System.ComponentModel; using System.Linq; using System.Windows.Input; +using System.Xml.Linq; using TEdit.Common.Reactive; using TEdit.Common.Reactive.Command; using TEdit.Configuration; @@ -737,17 +738,31 @@ public bool DownedFlyingDutchman public int TreeTop1 { get => TreeTopVariations[0]; - set => TreeTopVariations[0] = (int)value; + set + { + TreeTopVariations[0] = (int)value; + this.RaisePropertyChanged(); + } } public int TreeTop2 { get => TreeTopVariations[1]; - set => TreeTopVariations[1] = (int)value; + set + { + TreeTopVariations[1] = (int)value; + this.RaisePropertyChanged(); + } } public int TreeTop3 { get => TreeTopVariations[2]; - set => TreeTopVariations[2] = (int)value; + set + { + + TreeTopVariations[2] = value; + this.RaisePropertyChanged(); + + } } public int TreeTop4 { @@ -763,11 +778,13 @@ public int TreeTop4 [Reactive] public byte BgJungle { get; set; } [Reactive] public byte BgCorruption { get; set; } [Reactive] public byte BgTree { get; set; } + public byte Bg8 { get => BgTree; set => BgTree = value; } + [Reactive] public byte BgTree2 { get; set; } [Reactive] public byte BgTree3 { get; set; } [Reactive] public byte BgTree4 { get; set; } @@ -783,6 +800,7 @@ public int TilesHigh set { _tilesHigh = value; + this.RaiseAndSetIfChanged(ref _tilesHigh, value); UpdateMaxLayerLevels(); } }