summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-14 17:52:03 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-14 17:58:14 +0900
commitdfd17c7a7fd1f5dd85f61a6feef96c616e02cfcb (patch)
tree1a319e3029bd13436ae266f7f1658a8ccd9bb92f /qt-ui/divelistview.h
parent179615f3a9a7a657f9039e124865b2f449ddb703 (diff)
downloadsubsurface-dfd17c7a7fd1f5dd85f61a6feef96c616e02cfcb.tar.gz
Maintain the selection when aborting "dive add"
We remember what was selected before and restore it. Maybe there's a more "Qt way" of doing this, but my implementation appears to work :-) Also remove unconditional debug output that snuck into an earlier commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.h')
-rw-r--r--qt-ui/divelistview.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h
index f71013177..bcd603e12 100644
--- a/qt-ui/divelistview.h
+++ b/qt-ui/divelistview.h
@@ -26,6 +26,8 @@ public:
bool eventFilter(QObject* , QEvent* );
void unselectDives();
void selectDive(struct dive *, bool scrollto = false, bool toggle = false);
+ void rememberSelection();
+ void restoreSelection();
void contextMenuEvent(QContextMenuEvent *event);
QSet<dive_trip_t *> selectedTrips;
@@ -50,6 +52,7 @@ signals:
private:
bool mouseClickSelection;
QList<int> expandedRows;
+ QList<int> selectedDives;
int sortColumn;
Qt::SortOrder currentOrder;
DiveTripModel::Layout currentLayout;