mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Editor - Always update layer shape on UI thread
This commit is contained in:
parent
a2ce3b9d9c
commit
1f528ce51e
@ -8,6 +8,7 @@ using Avalonia;
|
||||
using Avalonia.Controls.Mixins;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Skia;
|
||||
using Avalonia.Threading;
|
||||
using ReactiveUI;
|
||||
using SkiaSharp;
|
||||
|
||||
@ -27,7 +28,7 @@ public class LayerShapeVisualizerViewModel : ActivatableViewModelBase, IVisualiz
|
||||
|
||||
this.WhenActivated(d =>
|
||||
{
|
||||
Observable.FromEventPattern(x => Layer.RenderPropertiesUpdated += x, x => Layer.RenderPropertiesUpdated -= x).Subscribe(_ => Update()).DisposeWith(d);
|
||||
Observable.FromEventPattern(x => Layer.RenderPropertiesUpdated += x, x => Layer.RenderPropertiesUpdated -= x).Subscribe(_ => Dispatcher.UIThread.Post(Update)).DisposeWith(d);
|
||||
Observable.FromEventPattern<LayerPropertyEventArgs>(x => Layer.Transform.Position.CurrentValueSet += x, x => Layer.Transform.Position.CurrentValueSet -= x)
|
||||
.Subscribe(_ => UpdateTransform())
|
||||
.DisposeWith(d);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user