mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 09:40:07 +01:00
[poincare] Fix empty layout insertion in horizontal layout
This commit is contained in:
@@ -388,7 +388,12 @@ void HorizontalLayoutReference::addOrMergeChildAtIndex(LayoutReference l, int in
|
||||
}
|
||||
|
||||
void HorizontalLayoutReference::addChildAtIndex(LayoutReference l, int index, int currentNumberOfChildren, LayoutCursor * cursor, bool removeEmptyChildren) {
|
||||
if (!removeEmptyChildren || !l.isEmpty()) {
|
||||
if (!removeEmptyChildren
|
||||
|| !l.isEmpty()
|
||||
|| numberOfChildren() == 0
|
||||
|| (index < numberOfChildren()
|
||||
&& childAtIndex(index).mustHaveLeftSibling()))
|
||||
{
|
||||
LayoutReference::addChildAtIndex(l, index, currentNumberOfChildren, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user