1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Profile editor - Fixed keyframe positions of groups not updating

This commit is contained in:
Robert 2022-06-09 21:45:21 +02:00
parent 13d2ee0c3b
commit ecbc3e4f35
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using Artemis.Storage.Entities.Profile;
namespace Artemis.Core
@ -6,7 +7,7 @@ namespace Artemis.Core
/// <summary>
/// Represents a keyframe on a <see cref="ILayerProperty" /> containing a value and a timestamp
/// </summary>
public interface ILayerPropertyKeyframe
public interface ILayerPropertyKeyframe : INotifyPropertyChanged
{
/// <summary>
/// Gets an untyped reference to the layer property of this keyframe

View File

@ -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<double> keyframePositions)
.Subscribe()