[Libreoffice-commits] core.git: vcl/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 26 10:56:36 UTC 2021


 vcl/source/window/printdlg.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Tue Jan 19 19:24:53 2021 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Tue Jan 26 11:55:59 2021 +0100

    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 at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>

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(),


More information about the Libreoffice-commits mailing list