From d3fe3494fef7b43556bfd8bd3b2128a3e0dc623d Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 8 Nov 2013 21:08:14 -0200 Subject: Save / Restore the Tree after organizing by other columns. This patch saves and restores the state of the TreeView after the user clicks on another columns that will make the tree disappear. All of the branche states are saved, this way the expanded nodes will be restored when the user gets back to tree mode. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/divelistview.h') diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index 73f417951..f71013177 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -49,6 +49,7 @@ signals: private: bool mouseClickSelection; + QList expandedRows; int sortColumn; Qt::SortOrder currentOrder; DiveTripModel::Layout currentLayout; @@ -56,6 +57,8 @@ private: QModelIndex contextMenuIndex; void merge_trip(const QModelIndex &a, const int offset); void setupUi(); + void backupExpandedRows(); + void restoreExpandedRows(); }; #endif // DIVELISTVIEW_H -- cgit v1.2.3-70-g09d2