* Renamed fLayoutValid to fMinMaxValid.

* Clear fMinMaxValid when a new constraint is added. "Height for width"
  constraints are therefore no longer ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22343 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-09-28 14:13:34 +00:00
parent 641e015e6e
commit 8bced38bb2
2 changed files with 7 additions and 5 deletions

View File

@ -166,7 +166,7 @@ ComplexLayouter::ComplexLayouter(int32 elementCount, int32 spacing)
fSumBackups(new(nothrow) SumItemBackup[elementCount + 1]),
fOptimizer(new(nothrow) LayoutOptimizer(elementCount)),
fUnlimited(B_SIZE_UNLIMITED / (elementCount == 0 ? 1 : elementCount)),
fLayoutValid(false),
fMinMaxValid(false),
fOptimizerConstraintsAdded(false)
{
if (fConstraints)
@ -247,6 +247,8 @@ ComplexLayouter::AddConstraints(int32 element, int32 length,
constraint->next = *slot;
*slot = constraint;
}
fMinMaxValid = false;
}
@ -386,7 +388,7 @@ ComplexLayouter::CloneLayouter()
(fElementCount + 1) * sizeof(SumItemBackup));
layouter->fMin = fMin;
layouter->fMax = fMax;
layouter->fLayoutValid = fLayoutValid;
layouter->fMinMaxValid = fMinMaxValid;
return layouterDeleter.Detach();
}
@ -577,7 +579,7 @@ ComplexLayouter::_ValidateLayout()
// incorporated, the resulting minc[n] and maxc[n] are the min and max
// limits we wanted to compute.
if (fLayoutValid)
if (fMinMaxValid)
return;
fSums[0].min = 0;
@ -656,7 +658,7 @@ ComplexLayouter::_ValidateLayout()
}
fOptimizerConstraintsAdded = false;
fLayoutValid = true;
fMinMaxValid = true;
}

View File

@ -74,7 +74,7 @@ private:
float fMin;
float fMax;
int32 fUnlimited;
bool fLayoutValid;
bool fMinMaxValid;
bool fOptimizerConstraintsAdded;
};