mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher] In table view, add method 'reloadCellAtLocation'
Change-Id: I2d662669621392698ee963a6c8e70d3d2f4ee829
This commit is contained in:
@@ -96,7 +96,7 @@ void ImageTableView::select(bool select) {
|
||||
if (!select) {
|
||||
m_selectableTableView.deselectTable();
|
||||
m_isSelected = select;
|
||||
willDisplayCellForIndex(m_selectableTableView.cellAtLocation(0,0), 0);
|
||||
m_selectableTableView.reloadCellAtLocation(0, 0);
|
||||
} else {
|
||||
m_isSelected = select;
|
||||
m_selectableTableView.selectCellAtLocation(0, (int)m_calculation->type());
|
||||
|
||||
@@ -64,7 +64,7 @@ bool MainController::handleEvent(Ion::Events::Event event) {
|
||||
return false;
|
||||
}
|
||||
GlobalPreferences::sharedGlobalPreferences()->setShowUpdatePopUp(!GlobalPreferences::sharedGlobalPreferences()->showUpdatePopUp());
|
||||
willDisplayCellForIndex(m_selectableTableView.cellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()), m_selectableTableView.selectedRow());
|
||||
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||
return true;
|
||||
}
|
||||
m_subController.setNodeModel(m_nodeModel->children(selectedRow()));
|
||||
|
||||
@@ -126,7 +126,7 @@ bool FloatParameterController::textFieldDidFinishEditing(TextField * textField,
|
||||
if (!setParameterAtIndex(selectedRow(), floatBody)) {
|
||||
return false;
|
||||
}
|
||||
willDisplayCellForIndex(selectableTableView()->selectedCell(), activeCell());
|
||||
selectableTableView()->reloadCellAtLocation(0, activeCell());
|
||||
selectableTableView()->reloadData();
|
||||
if (event == Ion::Events::EXE || event == Ion::Events::OK) {
|
||||
selectableTableView()->selectCellAtLocation(selectedColumn(), selectedRow()+1);
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
virtual void scrollToCell(int i, int j);
|
||||
HighlightCell * cellAtLocation(int i, int j);
|
||||
void reloadData();
|
||||
void reloadCellAtLocation(int i, int j);
|
||||
KDSize size() const;
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
@@ -28,6 +29,7 @@ protected:
|
||||
ContentView(TableView * tableView, TableViewDataSource * dataSource, KDCoordinate horizontalCellOverlapping, KDCoordinate verticalCellOverlapping);
|
||||
|
||||
void scrollToCell(int i, int j) const;
|
||||
void reloadCellAtLocation(int i, int j);
|
||||
HighlightCell * cellAtLocation(int i, int j);
|
||||
void resizeToFitContent();
|
||||
TableViewDataSource * dataSource();
|
||||
|
||||
@@ -54,6 +54,10 @@ void TableView::reloadData() {
|
||||
layoutSubviews();
|
||||
}
|
||||
|
||||
void TableView::reloadCellAtLocation(int i, int j) {
|
||||
m_contentView.reloadCellAtLocation(i, j);
|
||||
}
|
||||
|
||||
/* TableView::ContentView */
|
||||
|
||||
TableView::ContentView::ContentView(TableView * tableView, TableViewDataSource * dataSource, KDCoordinate horizontalCellOverlapping, KDCoordinate verticalCellOverlapping) :
|
||||
@@ -120,6 +124,10 @@ void TableView::ContentView::scrollToCell(int x, int y) const {
|
||||
m_tableView->setContentOffset(KDPoint(contentOffsetX, contentOffsetY));
|
||||
}
|
||||
|
||||
void TableView::ContentView::reloadCellAtLocation(int i, int j) {
|
||||
m_dataSource->willDisplayCellAtLocation(cellAtLocation(i, j), i, j);
|
||||
}
|
||||
|
||||
int TableView::ContentView::typeOfSubviewAtIndex(int index) const {
|
||||
assert(index >= 0);
|
||||
int i = absoluteColumnNumberFromSubviewIndex(index);
|
||||
|
||||
Reference in New Issue
Block a user