From ecbc3e4f354f36b804179f47ffcc1722ad4dcd8f Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 9 Jun 2022 21:45:21 +0200 Subject: [PATCH] Profile editor - Fixed keyframe positions of groups not updating --- .../Models/Profile/LayerProperties/ILayerPropertyKeyframe.cs | 3 ++- .../Panels/Properties/Timeline/TimelineGroupViewModel.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Artemis.Core/Models/Profile/LayerProperties/ILayerPropertyKeyframe.cs b/src/Artemis.Core/Models/Profile/LayerProperties/ILayerPropertyKeyframe.cs index ab3446359..d236e297c 100644 --- a/src/Artemis.Core/Models/Profile/LayerProperties/ILayerPropertyKeyframe.cs +++ b/src/Artemis.Core/Models/Profile/LayerProperties/ILayerPropertyKeyframe.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using Artemis.Storage.Entities.Profile; namespace Artemis.Core @@ -6,7 +7,7 @@ namespace Artemis.Core /// /// Represents a keyframe on a containing a value and a timestamp /// - public interface ILayerPropertyKeyframe + public interface ILayerPropertyKeyframe : INotifyPropertyChanged { /// /// Gets an untyped reference to the layer property of this keyframe diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/TimelineGroupViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/TimelineGroupViewModel.cs index 62b39efe0..5370999e3 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/TimelineGroupViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/TimelineGroupViewModel.cs @@ -27,6 +27,7 @@ public class TimelineGroupViewModel : ActivatableViewModelBase PropertyGroupViewModel.Keyframes .ToObservableChangeSet() .AutoRefreshOnObservable(_ => profileEditorService.PixelsPerSecond) + .AutoRefreshOnObservable(k => k.WhenAnyValue(kv => kv.Position)) .Transform(k => k.Position.TotalSeconds * _pixelsPerSecond, true) .Bind(out ReadOnlyObservableCollection keyframePositions) .Subscribe()