aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelogexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-28 14:24:38 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-04-02 13:53:23 -0700
commit2789bb05b133a7cf54081d58d4f5c51c8977e951 (patch)
tree48bb6337c24dcd87bd3d8fcf0ac545f544d11744 /desktop-widgets/divelogexportdialog.cpp
parent36f0ba9abed595885edf52c8db848da71fa30b11 (diff)
downloadsubsurface-2789bb05b133a7cf54081d58d4f5c51c8977e951.tar.gz
profile: display arbitrary dive
So far the profile operated on the global displayed_dive. Instead, take the dive to be displayed as a parameter to the plotDive() functions. This is necessary if we want to have multiple concurrent profile objects. Think for example for printing or for mobile where multiple dive objects are active at the same time. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelogexportdialog.cpp')
-rw-r--r--desktop-widgets/divelogexportdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index e9a4beb4e..30e389dde 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -229,7 +229,7 @@ void exportProfile(const struct dive *dive, const QString filename)
profile->setPrintMode(true);
double scale = profile->getFontPrintScale();
profile->setFontPrintScale(4 * scale);
- profile->plotDive(dive, true, false, true);
+ profile->plotDive(dive, 0, true, false, true);
QImage image = QImage(profile->size() * 4, QImage::Format_RGB32);
QPainter paint;
paint.begin(&image);
@@ -238,5 +238,5 @@ void exportProfile(const struct dive *dive, const QString filename)
profile->setToolTipVisibile(true);
profile->setFontPrintScale(scale);
profile->setPrintMode(false);
- profile->plotDive(dive, true);
+ profile->plotDive(dive, 0, true); // TODO: Shouldn't this plot the current dive?
}