diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 21:20:10 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 21:20:10 -0800 |
commit | ae709ab30ee6abe90f7731497d6e037c4585cb2c (patch) | |
tree | df73664fc5005190d1368367fa8f3639def6ed24 /profile-widget/divecartesianaxis.cpp | |
parent | 3ef9e07380dc18eefd294a6978d93e9d381f9d5d (diff) | |
download | subsurface-ae709ab30ee6abe90f7731497d6e037c4585cb2c.tar.gz |
Untangle profile from MainWindow: work around print mode
Since we don't support printing in subsurface-mobile this solves the
problem at hand - but it doesn't do what we really want which is to
untangle the Profile from the MainWindow.
Partial credit.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/divecartesianaxis.cpp')
-rw-r--r-- | profile-widget/divecartesianaxis.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index f40e1c3e5..0336ed129 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -4,9 +4,13 @@ #include "preferences/preferencesdialog.h" #include "diveplotdatamodel.h" #include "animationfunctions.h" +#ifndef SUBSURFACE_MOBILE #include "mainwindow.h" +#endif #include "divelineitem.h" #include "profilewidget2.h" +#include <QDebug> +#include <QGraphicsWidget> QPen DiveCartesianAxis::gridPen() { @@ -144,7 +148,11 @@ void emptyList(QList<T *> &list, double steps) void DiveCartesianAxis::updateTicks(color_indice_t color) { +#ifndef SUBSURFACE_MOBILE if (!scene() || (!changed && !MainWindow::instance()->graphics()->getPrintMode())) +#else + if (!scene() || !changed) +#endif return; QLineF m = line(); // unused so far: |