From e494b39b337b26c44e4474cfde78f20d721ce83b Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 7 Dec 2021 17:59:19 +0300 Subject: [PATCH] Unix: Correctly update options pane for PDF printer Update printer and m_currentPrintDevice before calling QPrintDialogPrivate::selectPrinter() to show values for PDF printer instead of the previously selected printer. Pick-to: 6.3 6.2 5.15 Change-Id: Iacc34ca4460ec4de0b4b373cd875628733df01bd Reviewed-by: Albert Astals Cid --- src/printsupport/dialogs/qprintdialog_unix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index dbebd037191..85225e75b0d 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -1172,10 +1172,10 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index) QString filename = widget.filename->text(); widget.filename->setText(filename); widget.lOutput->setEnabled(true); - if (optionsPane) - optionsPane->selectPrinter(QPrinter::PdfFormat); printer->setOutputFormat(QPrinter::PdfFormat); m_currentPrintDevice = QPrintDevice(); + if (optionsPane) + optionsPane->selectPrinter(QPrinter::PdfFormat); return; } }