mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
list models: include current dive in selection signal
After sending a selection-change signal, there follows a current dive changed signal. Combine these two into a single signal, since usually the current dive is changed when the selection is changed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
832398180c
commit
9ccb940a1b
8 changed files with 23 additions and 48 deletions
|
|
@ -202,7 +202,7 @@ void setSelection(const std::vector<dive *> &selection, dive *currentDive, int c
|
|||
auto selectedDives = setSelectionCore(selection, currentDive, currentDc);
|
||||
|
||||
// Send the new selection to the UI.
|
||||
emit diveListNotifier.divesSelected(selectedDives);
|
||||
emit diveListNotifier.divesSelected(selectedDives, current_dive);
|
||||
}
|
||||
|
||||
// Set selection, but try to keep the current dive. If current dive is not in selection,
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ signals:
|
|||
void tripChanged(dive_trip *trip, TripField field);
|
||||
|
||||
// Selection changes
|
||||
void divesSelected(const QVector<dive *> &dives);
|
||||
void divesSelected(const QVector<dive *> &dives, dive *currentDive);
|
||||
|
||||
// Dive site signals. Add and delete events are sent per dive site and
|
||||
// provide an index into the global dive site table.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue