diff --git a/escher/include/escher/table_view.h b/escher/include/escher/table_view.h index ca2db0d32..5c16a8c30 100644 --- a/escher/include/escher/table_view.h +++ b/escher/include/escher/table_view.h @@ -34,7 +34,6 @@ protected: void setHorizontalCellOverlap(KDCoordinate o) { m_horizontalCellOverlap = o; } void setVerticalCellOverlap(KDCoordinate o) { m_verticalCellOverlap = o; } - void scrollToCell(int i, int j) const; void reloadCellAtLocation(int i, int j); HighlightCell * cellAtLocation(int i, int j); TableViewDataSource * dataSource(); @@ -42,6 +41,7 @@ protected: int columnsScrollingOffset() const; int numberOfDisplayableRows() const; int numberOfDisplayableColumns() const; + KDRect cellFrame(int i, int j) const; void layoutSubviews() override; protected: #if ESCHER_VIEW_LOGGING @@ -54,9 +54,6 @@ protected: int numberOfSubviews() const override; View * subviewAtIndex(int index) override; - /* realCellWidth enables to handle list view for which - * TableViewDataSource->cellWidht = 0 */ - KDRect cellFrame(int i, int j) const; /* These two methods transform an index (of subview for instance) into * coordinates that refer to the data source entire table */ int absoluteColumnNumberFromSubviewIndex(int index) const; diff --git a/escher/src/table_view.cpp b/escher/src/table_view.cpp index ed0ae9c7c..79345f8f5 100644 --- a/escher/src/table_view.cpp +++ b/escher/src/table_view.cpp @@ -20,7 +20,7 @@ TableViewDataSource * TableView::dataSource() { // This method computes the minimal scrolling needed to properly display the // requested cell. void TableView::scrollToCell(int i, int j) { - m_contentView.scrollToCell(i, j); + scrollToContentRect(m_contentView.cellFrame(i, j), true); } HighlightCell * TableView::cellAtLocation(int i, int j) { @@ -96,10 +96,6 @@ KDCoordinate TableView::ContentView::width() const { return result ? result : m_tableView->maxContentWidthDisplayableWithoutScrolling(); } -void TableView::ContentView::scrollToCell(int x, int y) const { - m_tableView->scrollToContentRect(cellFrame(x, y), true); -} - void TableView::ContentView::reloadCellAtLocation(int i, int j) { HighlightCell * cell = cellAtLocation(i, j); if (cell) {