summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorAlexander Volkov <avolkov@astralinux.ru>2021-12-07 17:59:19 +0300
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2022-03-15 19:18:55 +0000
commite494b39b337b26c44e4474cfde78f20d721ce83b (patch)
treee73a5060ccebe3612beecd8ed4026742b93abc17 /src/printsupport
parent7c12eb17067e55717197effdc84d7cd93f30b7ac (diff)
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 <albert.astals.cid@kdab.com>
Diffstat (limited to 'src/printsupport')
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index dbebd03719..85225e75b0 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;
}
}