mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/matrix_layout] Remove unneeded code
This commit is contained in:
committed by
RubenNumworks
parent
6ef0b3b4ab
commit
d17b74b440
@@ -290,7 +290,6 @@ void MatrixLayoutNode::didReplaceChildAtIndex(int index, LayoutCursor * cursor,
|
||||
assert(index >= 0 && index < m_numberOfColumns*m_numberOfRows);
|
||||
int rowIndex = rowAtChildIndex(index);
|
||||
int columnIndex = columnAtChildIndex(index);
|
||||
bool rowIsEmpty = isRowEmpty(rowIndex);
|
||||
bool columnIsEmpty = isColumnEmpty(columnIndex);
|
||||
int newIndex = index;
|
||||
if (columnIsEmpty && m_numberOfColumns > 2) {
|
||||
@@ -298,14 +297,6 @@ void MatrixLayoutNode::didReplaceChildAtIndex(int index, LayoutCursor * cursor,
|
||||
deleteColumnAtIndex(columnIndex);
|
||||
newIndex -= rowIndex;
|
||||
}
|
||||
if (!rowIsEmpty && !columnIsEmpty) {
|
||||
LayoutNode * newChild = childAtIndex(newIndex);
|
||||
if (newChild->isEmpty()
|
||||
&& (childIsRightOfGrid(index)|| childIsBottomOfGrid(index)))
|
||||
{
|
||||
static_cast<EmptyLayoutNode *>(newChild)->setColor(EmptyLayoutNode::Color::Grey);
|
||||
}
|
||||
}
|
||||
if (cursor) {
|
||||
assert(newIndex >= 0 && newIndex < m_numberOfColumns*m_numberOfRows);
|
||||
cursor->setLayoutNode(childAtIndex(newIndex));
|
||||
|
||||
Reference in New Issue
Block a user