subsurface/profile-widget
Berthold Stoeger 45395fd466 Dive pictures: Don't plot pictures twice when changing current dive
In MainWindow::current_dive_changed() first plotDive() is called,
which replots all the pictures by calling plotPictures(). This
is pointess, because it plots the pictures of the previous dive.

Then, updateDiveInfo() is called, which resets the dive pictures
and automatically replots them. Thus, switching between dives
both with hundreds of pictures is way slower than necessary.

Switching the plotDive() and updateDiveInfo() calls doesn't work.
The reason is not 100% clear, but it doesn't make sense to plot
pictures of the new dive as long as the profile still shows the
old dive anyway.

As a quick-fix, add a flag to plotDive(), which tells the function
to clear the pictures list instead of redrawing it.
Ultimately, plotDive() should probably be split in two functions.
One for the callers who update the pictures themselves and one
for the others.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-17 07:24:54 -07:00
..
animationfunctions.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
animationfunctions.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
CMakeLists.txt Correctly handle SubsurfaceMobile 2016-01-08 08:04:24 -08:00
divecartesianaxis.cpp Core: introduce new subsurface-string header 2018-05-14 10:13:39 -07:00
divecartesianaxis.h Typo: indice -> index 2018-01-10 21:25:02 +01:00
diveeventitem.cpp Read and write divemode changes (xml and git) 2018-05-14 23:47:00 +03:00
diveeventitem.h Dive pictures: remove close-button optimization 2018-05-13 13:52:35 -07:00
divelineitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.cpp Dive pictures: Fix crash on picture delete 2018-05-17 07:22:04 -07:00
divepixmapitem.h Dive pictures: Fix crash on picture delete 2018-05-17 07:22:04 -07:00
diveprofileitem.cpp Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
diveprofileitem.h Typo: Threshould -> Threshold 2018-01-10 21:25:02 +01:00
diverectitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.cpp Core: remove dive.h from files that don't need it 2018-05-14 10:13:39 -07:00
divetooltipitem.h code cleanup: remove unimplemented classes and structs 2017-06-16 05:31:41 +09:00
profilewidget2.cpp Dive pictures: Don't plot pictures twice when changing current dive 2018-05-17 07:24:54 -07:00
profilewidget2.h Dive pictures: Don't plot pictures twice when changing current dive 2018-05-17 07:24:54 -07:00
ruleritem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
ruleritem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
tankitem.cpp cleanup: Uninitialized pointer field 2017-12-29 09:14:20 -08:00
tankitem.h cleanup: Uninitialized pointer field 2017-12-29 09:14:20 -08:00