This commit is contained in:
EugeneTes
2026-03-23 10:30:30 +01:00
parent ac0b298644
commit 34b74ecdcd
17 changed files with 42 additions and 14 deletions

View File

@@ -15,6 +15,7 @@ public partial class PreviewWindow : ComponentBase, IDisposable
private DateTime _lastRenderTime = DateTime.MinValue;
private Timer? _pendingTimer;
private PreviewVM? _subscribedVm;
private bool _disposed;
protected override void OnParametersSet()
{
@@ -69,6 +70,8 @@ public partial class PreviewWindow : ComponentBase, IDisposable
private async Task RenderCurrentFrame()
{
if (_disposed) return;
_lastRenderTime = DateTime.UtcNow;
var mat = ViewModel?.ImagePreview;
@@ -88,6 +91,7 @@ public partial class PreviewWindow : ComponentBase, IDisposable
public void Dispose()
{
_disposed = true;
_pendingTimer?.Dispose();
Unsubscribe();
}