From c03cc85232e1a5952f6c5be2ede7fdfe3fccd94b Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 4 Jul 2024 18:18:35 +0800 Subject: [PATCH] enhance: skip update layout after detached from visual tree --- src/Views/Repository.axaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Repository.axaml.cs b/src/Views/Repository.axaml.cs index 012eca75..28c493a4 100644 --- a/src/Views/Repository.axaml.cs +++ b/src/Views/Repository.axaml.cs @@ -376,7 +376,7 @@ namespace SourceGit.Views return; var grid = sender as Grid; - if (grid == null) + if (grid == null || !grid.IsAttachedToVisualTree()) return; var leftHeight = grid.Bounds.Height - 28.0 * 5;