mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/calculation] Fix calculation height computation
It was done in two places before, which created inconsistencies
This commit is contained in:
committed by
EmilieNumworks
parent
0379327b06
commit
a56a73b0ba
@@ -206,13 +206,13 @@ KDCoordinate HistoryController::rowHeight(int j) {
|
||||
return 0;
|
||||
}
|
||||
Shared::ExpiringPointer<Calculation> calculation = calculationAtIndex(j);
|
||||
return calculation->height(
|
||||
App::app()->localContext(),
|
||||
HistoryViewCell::k_margin,
|
||||
HistoryViewCell::k_inputOutputViewsVerticalMargin,
|
||||
j == selectedRow() && selectedSubviewType() == SubviewType::Output,
|
||||
false,
|
||||
&HistoryViewCell::LayoutsCanBeSingleLine);
|
||||
bool expanded = j == selectedRow() && selectedSubviewType() == SubviewType::Output;
|
||||
KDCoordinate result = calculation->memoizedHeight(expanded);
|
||||
if (result < 0) {
|
||||
result = HistoryViewCell::Height(calculation.pointer(), expanded);
|
||||
calculation->setMemoizedHeight(expanded, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int HistoryController::typeAtLocation(int i, int j) {
|
||||
|
||||
Reference in New Issue
Block a user