mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] Add methods viewWillAppear/Disappear in view controller instead
of keeping track of dataHasChanged in the selectable table view Change-Id: Id2626f527f44714e29b9bd66e2c843193e1b57b5
This commit is contained in:
@@ -78,14 +78,16 @@ void EditableCellTableViewController::willDisplayCellAtLocationWithDisplayMode(T
|
||||
if (j == numberOfRows() - 1) {
|
||||
/* Display an empty line only if there is enough space for a new element in
|
||||
* data */
|
||||
if (numberOfElements() < maxNumberOfElements()) {
|
||||
if (numberOfElements() < maxNumberOfElements() && !myEditableValueCell->isEditing()) {
|
||||
buffer[0] = 0;
|
||||
myEditableValueCell->setText(buffer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Complex::convertFloatToText(dataAtLocation(i, j), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, displayMode);
|
||||
myEditableValueCell->setText(buffer);
|
||||
if (!myEditableValueCell->isEditing()) {
|
||||
Complex::convertFloatToText(dataAtLocation(i, j), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, displayMode);
|
||||
myEditableValueCell->setText(buffer);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -103,4 +105,9 @@ void EditableCellTableViewController::didBecomeFirstResponder() {
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
|
||||
void EditableCellTableViewController::viewWillAppear() {
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user