mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
divetripmodel: change current dive if no dives are selected
The DiveTripModelTree::divesSelected() returned early if no dives were selected. Thus, the current dive was not updated. Remove the check for no dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ff68fd7c0c
commit
950ae951bc
1 changed files with 0 additions and 2 deletions
|
@ -1407,8 +1407,6 @@ QModelIndex DiveTripModelTree::diveToIdx(const dive *d) const
|
||||||
void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn, dive *current)
|
void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn, dive *current)
|
||||||
{
|
{
|
||||||
QVector <dive *> dives = visibleDives(divesIn);
|
QVector <dive *> dives = visibleDives(divesIn);
|
||||||
if (dives.empty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// We got a number of dives that have been selected. Turn this into QModelIndexes and
|
// We got a number of dives that have been selected. Turn this into QModelIndexes and
|
||||||
// emit a signal, so that views can change the selection.
|
// emit a signal, so that views can change the selection.
|
||||||
|
|
Loading…
Reference in a new issue