From 1d416b329930ceef01a04009298ebc9b588e94a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Fri, 10 Apr 2020 17:01:36 +0200 Subject: [PATCH] [apps/code] Fix varbox row height --- apps/code/variable_box_controller.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/code/variable_box_controller.cpp b/apps/code/variable_box_controller.cpp index 1e20cf5a7..3a1563a34 100644 --- a/apps/code/variable_box_controller.cpp +++ b/apps/code/variable_box_controller.cpp @@ -75,9 +75,15 @@ void VariableBoxController::didEnterResponderChain(Responder * previousFirstResp } KDCoordinate VariableBoxController::rowHeight(int j) { - int cellType = typeAndOriginAtLocation(j); + NodeOrigin cellOrigin = NodeOrigin::CurrentScript; + int cumulatedOriginsCount = 0; + int cellType = typeAndOriginAtLocation(j, &cellOrigin, &cumulatedOriginsCount); if (cellType == k_itemCellType) { - return k_simpleItemRowHeight; // TODO LEA + //TODO LEA if cellOrigin == Imported? + if (scriptNodeAtIndex(j - cumulatedOriginsCount)->description() != nullptr) { + return k_complexItemRowHeight; + } + return k_simpleItemRowHeight; } assert(cellType == k_subtitleCellType); return k_subtitleRowHeight;