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>
This commit is contained in:
Dirk Hohndel 2015-11-05 21:20:10 -08:00
parent 3ef9e07380
commit ae709ab30e

View file

@ -4,9 +4,13 @@
#include "preferences/preferencesdialog.h" #include "preferences/preferencesdialog.h"
#include "diveplotdatamodel.h" #include "diveplotdatamodel.h"
#include "animationfunctions.h" #include "animationfunctions.h"
#ifndef SUBSURFACE_MOBILE
#include "mainwindow.h" #include "mainwindow.h"
#endif
#include "divelineitem.h" #include "divelineitem.h"
#include "profilewidget2.h" #include "profilewidget2.h"
#include <QDebug>
#include <QGraphicsWidget>
QPen DiveCartesianAxis::gridPen() QPen DiveCartesianAxis::gridPen()
{ {
@ -144,7 +148,11 @@ void emptyList(QList<T *> &list, double steps)
void DiveCartesianAxis::updateTicks(color_indice_t color) void DiveCartesianAxis::updateTicks(color_indice_t color)
{ {
#ifndef SUBSURFACE_MOBILE
if (!scene() || (!changed && !MainWindow::instance()->graphics()->getPrintMode())) if (!scene() || (!changed && !MainWindow::instance()->graphics()->getPrintMode()))
#else
if (!scene() || !changed)
#endif
return; return;
QLineF m = line(); QLineF m = line();
// unused so far: // unused so far: