mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: pass in_planner down to TemplateLayout
The TemplateLayout prints different dives depending on whether the planner is active. Instead of accessing a global variable, pass the status down from the MainWindow. That's all quite convoluted, since there are multiple layers involved. On the positive side, the in_planner() function has now no users an can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
18049bc8d0
commit
42cff9b3a5
10 changed files with 20 additions and 20 deletions
|
@ -19,8 +19,9 @@
|
|||
|
||||
template_options::color_palette_struct ssrf_colors, almond_colors, blueshades_colors, custom_colors;
|
||||
|
||||
PrintDialog::PrintDialog(QWidget *parent) :
|
||||
PrintDialog::PrintDialog(bool inPlanner, QWidget *parent) :
|
||||
QDialog(parent, QFlag(0)),
|
||||
inPlanner(inPlanner),
|
||||
printer(NULL),
|
||||
qprinter(NULL)
|
||||
{
|
||||
|
@ -174,10 +175,10 @@ void PrintDialog::createPrinterObj()
|
|||
{
|
||||
// create a new printer object
|
||||
if (!printer) {
|
||||
qprinter = new QPrinter();
|
||||
qprinter = new QPrinter;
|
||||
qprinter->setResolution(printOptions.resolution);
|
||||
qprinter->setOrientation((QPrinter::Orientation)printOptions.landscape);
|
||||
printer = new Printer(qprinter, printOptions, templateOptions, Printer::PRINT);
|
||||
printer = new Printer(qprinter, printOptions, templateOptions, Printer::PRINT, inPlanner);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue