diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2021-01-19 19:24:53 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-01-26 11:55:59 +0100 |
commit | 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9 (patch) | |
tree | 4e19cd4136c9851d0b1fe9951dd8c14c90313f06 /vcl | |
parent | 0bf25edae966625323be7454a813b76327471689 (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>
Diffstat (limited to 'vcl')
-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 7e0033aa2b9a..ecdcaeafa853 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -595,9 +595,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(); @@ -680,6 +677,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(), |