Merge pull request #490 from AntonyCorbett/var_scope_change_01

reduce scope of variable (remove unneeded calc)
This commit is contained in:
Marcin Ziąbek
2023-03-06 20:12:27 +01:00
committed by GitHub
+5 -4
View File
@@ -168,12 +168,13 @@ namespace QuestPDF.Elements.Table
if (!commands.Any())
return commands;
var tableHeight = commands.Max(cell => cell.Offset.Y + cell.Size.Height);
if (ExtendLastCellsToTableBottom)
{
var tableHeight = commands.Max(cell => cell.Offset.Y + cell.Size.Height);
AdjustLastCellSizes(tableHeight, commands);
}
return commands;
static float[] GetColumnLeftOffsets(IList<TableColumnDefinition> columns)