Browse Source

Fix #709: the Row element does not always correctly handle content that has conflicting layout constraints

Marcin Ziąbek 2 years ago
parent
commit
0cb8d6ae05
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/QuestPDF/Elements/Row.cs

+ 3 - 0
Source/QuestPDF/Elements/Row.cs

@@ -148,6 +148,9 @@ namespace QuestPDF.Elements
                 renderingCommands.Add(command);
                 renderingCommands.Add(command);
                 leftOffset += item.Width + Spacing;
                 leftOffset += item.Width + Spacing;
             }
             }
+
+            if (renderingCommands.Any(x => x.Measurement.Type == SpacePlanType.Wrap))
+                return renderingCommands;
             
             
             var rowHeight = renderingCommands
             var rowHeight = renderingCommands
                 .Where(x => !x.RowItem.IsRendered)
                 .Where(x => !x.RowItem.IsRendered)