diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2021-01-19 19:24:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-27 20:46:52 +0100 |
commit | c06c59ebdc32edfb22e391eeeb5b4838c6b728e6 (patch) | |
tree | c58314356a6b03a6e5fdde98ab9b42cac7dc4728 | |
parent | 52c0ce9351ae5d5e95394d7da71c0ce4bcace188 (diff) |
tdf#129180 Fix default paper size in the dropdown
Seems like a few calls to getJobPageSize() are necessary
before the Page size list can get a correct value.
This is why the problem appeared only on opening the dialog
but opening/closing the printers Properties dialog fixed it.
Thanks to Justin Luth for the idea!
Note: for testing, change among paper sizes supported by
the printer, e.g. A4, Legal and Letter.
See also tdf#134646
Change-Id: I792139e274886c1b232ef97a4f1e800e6b32cf71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109655
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fdb2b760d9fd3b65ad54bad14a62f3c47374731e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109987
-rw-r--r-- | vcl/source/window/printdlg.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 6d73b1449d6a..7640da4fcd22 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -622,9 +622,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC // update the text fields for the printer updatePrinterText(); - // set paper sizes listbox - setPaperSizes(); - // setup dependencies checkControlDependencies(); @@ -702,6 +699,10 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC updateNupFromPages(); + // tdf#129180 Delay setting the default value in the Paper Size list + // set paper sizes listbox + setPaperSizes(); + // lock the dialog height, regardless of later expander state mxScrolledWindow->set_size_request( mxScrolledWindow->get_preferred_size().Width() + mxScrolledWindow->get_vscroll_width(), |