aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp3
-rw-r--r--qt-ui/mainwindow.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index e8542da74..c17758547 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -276,6 +276,9 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
connect(ui.gflow, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged()));
connect(ui.printPlan, SIGNAL(pressed()), this, SLOT(printDecoPlan()));
+#ifdef NO_PRINTING
+ ui.printPlan->hide();
+#endif
// Creating (and canceling) the plan
connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan()));
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 9f741e84f..13a441349 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -20,7 +20,6 @@
#include <QStringList>
#include <QSettings>
#include <QShortcut>
-#include <QPrintDialog>
#include <fcntl.h>
#include "divelistview.h"
#include "starwidget.h"
@@ -43,6 +42,7 @@
#include "updatemanager.h"
#include "planner.h"
#ifndef NO_PRINTING
+#include <QPrintDialog>
#include "printdialog.h"
#endif
#include "divelogimportdialog.h"
@@ -440,6 +440,7 @@ void MainWindow::setPlanNotes(const char *notes)
void MainWindow::printPlan()
{
+#ifndef NO_PRINTING
QString diveplan = ui.divePlanOutput->toHtml();
QString withDisclaimer = diveplan + QString(disclaimer);
@@ -452,6 +453,7 @@ void MainWindow::printPlan()
ui.divePlanOutput->setHtml(withDisclaimer);
ui.divePlanOutput->print(&printer);
ui.divePlanOutput->setHtml(diveplan);
+#endif
}
void MainWindow::on_actionDivePlanner_triggered()