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 "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: