mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
179615f3a9
commit
dfd17c7a7f
5 changed files with 40 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue