mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 23:00:45 +01:00
[poincare] addLayoutAndMoveCursor collapses only if layout is not AFail
This commit is contained in:
@@ -213,9 +213,10 @@ void LayoutCursor::insertText(const char * text) {
|
||||
}
|
||||
|
||||
void LayoutCursor::addLayoutAndMoveCursor(LayoutRef l) {
|
||||
LayoutRef rootRef = m_layoutRef.root();
|
||||
bool layoutWillBeMerged = l.isHorizontal();
|
||||
m_layoutRef.addSibling(this, l, true);
|
||||
if (!layoutWillBeMerged) {
|
||||
if (!rootRef.isAllocationFailure() && !layoutWillBeMerged) {
|
||||
l.collapseSiblings(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user