mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix NO_PRINTING building again
Back in 6699e3ab
("Add print button to planner") unconditional printing
code was added. This puts that same code behind NO_PRINTING macro.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9f7c79557e
commit
5904be2e06
2 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue