Fix assertion violation in GenericBox.
This commit is contained in:
parent
97d4f62970
commit
c5f09bbf69
1 changed files with 5 additions and 2 deletions
|
|
@ -28,14 +28,17 @@ void GenericBox::prepare() {
|
||||||
pinned ? pinned->heightValue() : rpl::single(0),
|
pinned ? pinned->heightValue() : rpl::single(0),
|
||||||
wrap->heightValue()
|
wrap->heightValue()
|
||||||
) | rpl::start_with_next([=](int top, int height) {
|
) | rpl::start_with_next([=](int top, int height) {
|
||||||
|
Expects(_minHeight >= 0);
|
||||||
|
Expects(!_maxHeight || _minHeight <= _maxHeight);
|
||||||
|
|
||||||
setInnerTopSkip(top);
|
setInnerTopSkip(top);
|
||||||
const auto desired = top + height;
|
const auto desired = top + height;
|
||||||
setDimensions(
|
setDimensions(
|
||||||
currentWidth,
|
currentWidth,
|
||||||
std::clamp(
|
std::clamp(
|
||||||
desired,
|
desired,
|
||||||
_minHeight ? _minHeight : desired,
|
_minHeight,
|
||||||
_maxHeight ? _maxHeight : desired),
|
_maxHeight ? _maxHeight : std::max(_minHeight, desired)),
|
||||||
true);
|
true);
|
||||||
}, wrap->lifetime());
|
}, wrap->lifetime());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue