Browse Source

Automated layout issue detection algorithm improvement

Marcin Ziąbek 1 year ago
parent
commit
cdf98c7e6b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/QuestPDF/Drawing/Proxy/Helpers.cs

+ 2 - 2
Source/QuestPDF/Drawing/Proxy/Helpers.cs

@@ -100,7 +100,7 @@ internal static class Helpers
             // strategy:
             // strategy:
             // element contains wrapping children, they are likely the root cause,
             // element contains wrapping children, they are likely the root cause,
             // traverse them and attempt to fix them
             // traverse them and attempt to fix them
-            foreach (var child in element.Children.Where(x => x.Value.SpacePlanType is SpacePlanType.Wrap).ToArray())
+            foreach (var child in element.Children.Where(x => x.Value.SpacePlanType is SpacePlanType.Wrap))
                 Traverse(child);
                 Traverse(child);
                 
                 
             // check if fixing wrapping children helped
             // check if fixing wrapping children helped
@@ -113,7 +113,7 @@ internal static class Helpers
             // strategy:
             // strategy:
             // element has layout issues but no obvious/trivial root causes
             // element has layout issues but no obvious/trivial root causes
             // possibly the problem is in nested children of partial rendering children
             // possibly the problem is in nested children of partial rendering children
-            foreach (var child in element.Children.Where(x => x.Value.SpacePlanType is SpacePlanType.PartialRender).ToArray())
+            foreach (var child in element.Children.Where(x => x.Value.SpacePlanType is SpacePlanType.PartialRender))
                 Traverse(child);
                 Traverse(child);
                 
                 
             // check if fixing partial children helped
             // check if fixing partial children helped