Added workaround for invalidation issue in pan/zoom elements

This commit is contained in:
Robert committed 2023-06-10 13:23:38 +02:00
1 parent 34824dde42
commit 2e9b3d59d6
3 files changed
+11 -1

No files matched your search

@@ -48,6 +48,11 @@ public partial class SurfaceEditorView : ReactiveUserControl<SurfaceEditorViewMo
private void UpdateZoomBorderBackground()
{
if (ContainerZoomBorder.Background is VisualBrush visualBrush)
{
visualBrush.DestinationRect = new RelativeRect(ContainerZoomBorder.OffsetX * -1, ContainerZoomBorder.OffsetY * -1, 20, 20, RelativeUnit.Absolute);
// Workaround
// This fixes an issue where the container is not invalidated, which leaves behind a 'smear' since Avalonia 11 rc1, check if still required later
ContainerZoomBorder.InvalidateVisual();
}
}
}