diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-03 11:51:25 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-04 02:18:28 +0100 |
commit | 670a5bd55a44c0b5605dfdf796911c51aea55aba (patch) | |
tree | ac572660559b1c9414ce4eb850cc060a55cb97da /qt-models | |
parent | 65df9ca7b089adf649dae4379c5e14fc3489650e (diff) | |
download | subsurface-670a5bd55a44c0b5605dfdf796911c51aea55aba.tar.gz |
Dive sites: select each dive site only once
After selecting dives, the selected dive sites are collected.
This was done using the selectionModel()->selection().indexes(),
which is wrong, because it gives one index per row *and* column.
Accordingly, every dive site was added numerous times to the
array of dive sites to be selected. Change this to
selectionModel()->selectedRows(), which gives one entry per row.
Moreover, if multiple dives with the same site were selected,
this site was also added to the array multiple times. Therefore,
check the array before adding sites.
Note that all this should not change the user experience in
any way, it is only a code-hygiene thing.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
0 files changed, 0 insertions, 0 deletions