From ae709ab30ee6abe90f7731497d6e037c4585cb2c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 5 Nov 2015 21:20:10 -0800 Subject: 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 --- profile-widget/divecartesianaxis.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'profile-widget/divecartesianaxis.cpp') 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 +#include QPen DiveCartesianAxis::gridPen() { @@ -144,7 +148,11 @@ void emptyList(QList &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: -- cgit v1.2.3-70-g09d2