diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-06-23 12:46:42 +0200 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-06-23 20:08:46 +0200 |
commit | 2e230da3610dd1fc61badaf328a084512895fb90 (patch) | |
tree | 9f44691f588c3a1d846da5318e6e4148b95a6ef9 /desktop-widgets/divelistview.cpp | |
parent | 4716c820322dd654e43dc47087866b066b2e5910 (diff) | |
download | subsurface-2e230da3610dd1fc61badaf328a084512895fb90.tar.gz |
Cleanup: unify selection signals
For historic reasons, there where three distinct signals concerning
dive-selection from the undo-machinery:
1) divesSelected: sent newly selected dives
2) currentDiveChanged: sent if the current dive changed
3) selectionChanged: sent at the end of a command if either the selection
or the current dive changed
Since now the undo-commands do a full reset of the selection, merge these
three signals into a single signal.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index c010c0010..09c69c2a8 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -448,7 +448,7 @@ void DiveListView::selectDives(const QList<int> &newDiveSelection) scrollTo(idx); } // now that everything is up to date, update the widgets - emit diveListNotifier.selectionChanged(); + emit divesSelected(); dontEmitDiveChangedSignal = false; return; } @@ -663,7 +663,7 @@ void DiveListView::selectionChanged(const QItemSelection &selected, const QItemS } } if (!dontEmitDiveChangedSignal) - emit diveListNotifier.selectionChanged(); + emit divesSelected(); // Display the new, processed, selection QTreeView::selectionChanged(selectionModel()->selection(), newDeselected); @@ -1063,7 +1063,7 @@ void DiveListView::filterFinished() // If there are no more selected dives, select the first visible dive if (!selectionModel()->hasSelection()) selectFirstDive(); - emit diveListNotifier.selectionChanged(); + emit divesSelected(); } QString DiveListView::lastUsedImageDir() |