13
0

canvas: box should not try to reposition children for a zero-sized allocation

This commit is contained in:
Paul Davis 2021-09-10 13:01:26 -06:00
parent 63a74d0911
commit 107ff8466a

View File

@ -268,6 +268,12 @@ Box::reposition_children (Distance width, Distance height, bool shrink_width, bo
Distance largest_height = 0;
Rect uniform_size;
if (width == 0 && height == 0) {
return;
}
DEBUG_TRACE (DEBUG::CanvasBox|DEBUG::CanvasSizeAllocate, string_compose ("allocating children within %1 x %2, shrink/w %3 shrink/h %4\n", width, height, shrink_width, shrink_height));
if (homogenous) {
for (std::list<Item*>::const_iterator i = _items.begin(); i != _items.end(); ++i) {