mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] enable node navigation to decide the leaf row height
Change-Id: Ib013dd50c4d57df31e9be7813440037173415330
This commit is contained in:
@@ -69,6 +69,23 @@ void VariableBoxController::willDisplayCellForIndex(TableViewCell * cell, int in
|
||||
}
|
||||
}
|
||||
|
||||
KDCoordinate VariableBoxController::leafRowHeight(int index) {
|
||||
// TODO: add a constant to index if the node == matrice/liste
|
||||
const char * parentNodeLabel = m_listViewController.nodeModel()->label();
|
||||
const Expression * expression = m_context->scalarExpressionForIndex(index);
|
||||
if (strcmp(parentNodeLabel, "Matrices") == 0) {
|
||||
//expression = m_context->matrixExpressionForIndex(index);
|
||||
}
|
||||
if (strcmp(parentNodeLabel, "Listes") == 0) {
|
||||
//expression = m_context->listExpressionForIndex(index);
|
||||
}
|
||||
if (expression) {
|
||||
KDCoordinate expressionHeight = expression->createLayout()->size().height();
|
||||
return expressionHeight;
|
||||
}
|
||||
return k_leafRowHeight;
|
||||
}
|
||||
|
||||
Node * VariableBoxController::nodeModel() {
|
||||
return (Node *)&variableBoxModel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user