From 5108346af0420b89767adba92f2bd12f818928e8 Mon Sep 17 00:00:00 2001 From: Roman Bovsunivskiy Date: Tue, 2 Mar 2010 21:01:24 +0000 Subject: [PATCH] Printing on mac --- src/gui/FWBSettings.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/FWBSettings.cpp b/src/gui/FWBSettings.cpp index 4e129276d..389356a5e 100644 --- a/src/gui/FWBSettings.cpp +++ b/src/gui/FWBSettings.cpp @@ -602,15 +602,18 @@ void FWBSettings::getPrinterOptions(QPrinter *printer, int &pageWidth, int &pageHeight) { - printer->setPrinterName( - getStr("PrintSetup/printerName")); + QString name = getStr("PrintSetup/printerName"); + if (!name.isEmpty()) + printer->setPrinterName( + getStr("PrintSetup/printerName")); #ifndef _WIN32 printer->setPrinterSelectionOption( getStr("PrintSetup/printerSelectionOption")); #endif - printer->setOutputFileName( - getStr("PrintSetup/outputFileName")); - printer->setOrientation( + QString fileName = getStr("PrintSetup/outputFileName"); + if (!fileName.isEmpty()) + printer->setOutputFileName(fileName); + printer->setOrientation( QPrinter::Orientation(getInt("PrintSetup/orientation"))); printer->setPageSize( QPrinter::PageSize(getInt("PrintSetup/pageSize")));