aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-04-25 17:29:34 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-04-25 12:33:20 -0700
commitbd6b714be102b272725d61f8675c2cff322479e7 (patch)
tree9749cc50e1881295d9a8ebc06e96e5d139da12b5 /profile-widget
parent757eeced782b5ccfc2555c2e1f9af8bb525dd267 (diff)
downloadsubsurface-bd6b714be102b272725d61f8675c2cff322479e7.tar.gz
profile: ignore animation-speed setting when printing
When printing, the animation speed was set to 0 by the caller and later reset to the original value. Instead of modifying global state, set it internally (in the profile-code) to zero when in print mode. This is another small step in making the printing independent from the shown profile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index b82de0d9e..b980dd739 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -555,7 +555,7 @@ void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPict
return;
// special handling when switching from empty state
- animSpeed = instant || currentState == EMPTY ? 0 : qPrefDisplay::animation_speed();
+ animSpeed = instant || currentState == EMPTY || printMode ? 0 : qPrefDisplay::animation_speed();
// restore default zoom level
resetZoom();