diff --git a/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs b/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs index fd9cab497..2c658ccb2 100644 --- a/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs +++ b/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -203,13 +203,14 @@ namespace Artemis.Core /// /// Overrides the property value with the default value /// - public void ApplyDefaultValue() + public void ApplyDefaultValue(TimeSpan? time) { if (_disposed) throw new ObjectDisposedException("LayerProperty"); - BaseValue = DefaultValue; - CurrentValue = DefaultValue; + string json = JsonConvert.SerializeObject(DefaultValue, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All }); + + SetCurrentValue(JsonConvert.DeserializeObject(json), time); } private void ReapplyUpdate() @@ -506,7 +507,7 @@ namespace Artemis.Core throw new ArtemisCoreException("Layer property is not yet initialized"); if (!IsLoadedFromStorage) - ApplyDefaultValue(); + ApplyDefaultValue(null); else try { diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml index 8e29a9019..c0c51ccb0 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Tree/TreePropertyView.xaml @@ -1,4 +1,4 @@ - + - + - +