diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-08 21:08:14 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-09 15:33:55 +0900 |
commit | d3fe3494fef7b43556bfd8bd3b2128a3e0dc623d (patch) | |
tree | 0259c843b3f121c407e5ec41608a1acbb9b6f0a2 /qt-ui/divelistview.h | |
parent | 38287a1c1ea32b00f64b0ef60d9a99aff855335a (diff) | |
download | subsurface-d3fe3494fef7b43556bfd8bd3b2128a3e0dc623d.tar.gz |
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 <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.h')
-rw-r--r-- | qt-ui/divelistview.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<int> 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 |