Skip to content

Commit

Permalink
Make sure _q_printerChanged is called even if only pdf printer is ava…
Browse files Browse the repository at this point in the history
…ilable

Otherwise things like the pagesRadioButton don't get properly disabled

Change-Id: Idc0693b6747f13da5afb22e2187af310a5b454f8
Pick-to: 6.1 5.15
Reviewed-by: Andy Shaw <[email protected]>
  • Loading branch information
albert-astals-cid-kdab committed May 21, 2021
1 parent 8862685 commit 973700c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/printsupport/dialogs/qprintdialog_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,8 @@ void QUnixPrintWidgetPrivate::updateWidget()
widget.printers->insertSeparator(widget.printers->count());
widget.printers->addItem(QPrintDialog::tr("Print to File (PDF)"));
filePrintersAdded = true;
if (widget.printers->count() == 1)
_q_printerChanged(0);
}
if (!printToFile && filePrintersAdded) {
widget.printers->removeItem(widget.printers->count()-1);
Expand Down

0 comments on commit 973700c

Please sign in to comment.