Clarified the previous commit.

This commit is contained in:
Pietro Gagliardi 2016-06-14 21:00:57 -04:00
parent cdbe48cc83
commit cf8c1c67fe
1 changed files with 2 additions and 1 deletions

View File

@ -148,6 +148,7 @@ struct uiGrid {
int firstx, firsty;
BOOL *hexpand, *vexpand;
BOOL doit;
BOOL onlyEmptyAndSpanning;
[self removeOurConstraints];
if ([self->children count] == 0)
@ -158,6 +159,7 @@ struct uiGrid {
// ignore hidden controls
first = YES;
for (gc in self->children) {
// this bit is important: it ensures row ymin and column xmin have at least one cell to draw, so the onlyEmptyAndSpanning logic below will never run on those rows
if (!uiControlVisible(gc.c))
continue;
if (first) {
@ -206,7 +208,6 @@ struct uiGrid {
}
// if a row or column only contains emptys and spanning cells of a opposite-direction spannings, remove it by duplicating the previous row or column
BOOL onlyEmptyAndSpanning;
for (y = 0; y < ycount; y++) {
onlyEmptyAndSpanning = YES;
for (x = 0; x < xcount; x++)