subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 2021035cfc selection: replace selectedTrips() by singleSelectedTrip() function
To check wether the tab widgets should show the trip view, they called
the selectedTrips() function. The trip view was shown if that contained
only one trip. However, the selectedTrips() function was very slow,
because it has to query to core models.

Change the function to singleSelectedTrip(), which returns a trip
if there is exactly one trip selected. The function returns early
if there is more than one trip selected. This makes the select-all
case much faster.

There are two cases which are still very slow:
- List mode, because here all top-level items are queried.
- Dive log with many only top-level items.

Ultimately, we will have to cache the trip selection because
querying the model is too slow.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-26 13:54:59 -07:00
..
maintab.cpp selection: replace selectedTrips() by singleSelectedTrip() function 2020-04-26 13:54:59 -07:00
maintab.h desktop/tabwidgets: replace editMode by boolean 2020-04-07 00:13:35 +02:00
maintab.ui Fixes in tab widget UI layout 2019-11-16 08:32:07 -08:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveEquipment.cpp cleanup: remove unneeded includes from TabDiveEquipment.cpp 2020-04-07 00:13:35 +02:00
TabDiveEquipment.h undo: show multiple dive warning when editing equipment 2020-04-07 00:13:35 +02:00
TabDiveEquipment.ui Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabDiveExtraInfo.cpp Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp desktop: don't access first data element if no cylinders 2020-04-21 07:50:38 -07:00
TabDiveInformation.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveInformation.ui desktop UI: small cleanups of salinity code 2020-01-06 07:00:34 +09:00
TabDivePhotos.cpp Grammar: replaces 'indexes' by 'indices' 2020-03-11 08:26:30 -07:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Grammar: replaces 'indexes' by 'indices' 2020-03-11 08:26:30 -07:00
TabDiveSite.h Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveSite.ui desktop: rearrange widgets on the dive site tab 2020-04-20 09:46:24 -07:00
TabDiveStatistics.cpp Cleanup: use quotation marks for non-system includes 2019-12-04 13:00:23 +01:00
TabDiveStatistics.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00