Desktop: fix ColumnRange when a column's width is still 0

This commit is contained in:
Peter Fajdiga
2024-02-12 21:10:12 +01:00
parent 3ab230b498
commit ff3f6c5d6b

View File

@@ -268,8 +268,8 @@ namespace Desktop {
checkColumns();
while (leftColumn !== null || rightColumn !== null) {
const leftWidth = leftColumn === null ? 0 : leftColumn.getWidth();
const rightWidth = rightColumn === null ? 0 : rightColumn.getWidth();
const leftWidth = leftColumn === null ? -Infinity : leftColumn.getWidth();
const rightWidth = rightColumn === null ? -Infinity : rightColumn.getWidth();
if (leftWidth > rightWidth) {
this.addLeft(leftColumn!, gap);
leftColumn = grid.getPrevColumn(leftColumn!);