[poincare] Fix EmptyLayoutNode::willAddSibling

This commit is contained in:
Léa Saviot
2018-07-13 10:02:05 +02:00
parent dc18f59688
commit 1aeebaa2f0

View File

@@ -73,8 +73,12 @@ void EmptyLayoutNode::moveCursorVertically(VerticalDirection direction, LayoutCu
bool EmptyLayoutNode::willAddSibling(LayoutCursor * cursor, LayoutNode * sibling, bool moveCursor) {
if (sibling->mustHaveLeftSibling()) {
m_color = Color::Yellow;
return true;
} else {
LayoutRef(this).replaceWith(LayoutRef(sibling), cursor);
// WARNING: do not call "this" afterwards
return false;
}
return true;
/* Color currentColor = m_color;
int currentIndexInParent = indexInParent();
if (currentColor == Color::Grey) {