summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-07-10 22:47:53 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2019-07-12 09:59:28 +0200
commitefe9bcce02fdf4eaad05ff27d8f3eb96d3958cc3 (patch)
treedaacb3307786e7840a56f8761a32e4aee32de17c /profile-widget/profilewidget2.cpp
parentf93e0aafd52be47b99132a0d38629e1dffaaaa9e (diff)
downloadsubsurface-efe9bcce02fdf4eaad05ff27d8f3eb96d3958cc3.tar.gz
Profile: stop animations on export
The plotDive() function had a flag to plot pictures asynchronously. This was used on export. Rename this field to "instant" and disable animations when set. This should make sure that the axes are properly exported. Fixes #2170 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index c2514e59e..f3cf31c50 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -548,7 +548,7 @@ void ProfileWidget2::resetZoom()
}
// Currently just one dive, but the plan is to enable All of the selected dives.
-void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPictures, bool plotPicturesSynchronously)
+void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPictures, bool instant)
{
static bool firstCall = true;
#ifndef SUBSURFACE_MOBILE
@@ -594,7 +594,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
}
// special handling for the first time we display things
- animSpeed = qPrefDisplay::animation_speed();
+ animSpeed = instant ? 0 : qPrefDisplay::animation_speed();
if (firstCall && haveFilesOnCommandLine()) {
animSpeed = 0;
firstCall = false;
@@ -823,7 +823,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
if (doClearPictures)
clearPictures();
else
- plotPicturesInternal(d, plotPicturesSynchronously);
+ plotPicturesInternal(d, instant);
toolTipItem->refresh(mapToScene(mapFromGlobal(QCursor::pos())));
#endif