Bug 162289 - Print dialog only pre-selects new CUPS default printer when opened the second time
Summary: Print dialog only pre-selects new CUPS default printer when opened the second...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2024-08-01 09:04 UTC by Michael Weghorn
Modified: 2024-08-02 04:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2024-08-01 09:04:47 UTC
Steps to reproduce:

1) have at least 2 CUPS printers set up (can be dummy printers); in the following, "PDF" and "somedummy" will be used
2) set "PDF" as CUPS user default printer:
    lpoptions -d PDF
3) start LO Writer
4) press Ctrl+P to open the Print dialog
   -> "PDF" is preselected (OK)
5) close print dialog again
6) change CUPS default printer to "somedummy":
    lpoptions -d somedummy
7) press Ctrl+P to open the Print dialog
   -> the old default printer "PDF" is preselected (NOK)
8) close print dialog
9) press Ctrl+P to open the Print dialog
   -> the new default printer "somedummy" is preselected (OK)

Actual behavior: s. above

Expected behavior: The new default printer should be preselected when the print dialog is opened in step 7) already, not only when the print dialog is opened a second time (step 9) after changing the default printer.

Further information:
This was initially noticed while testing the pending Gerrit change to update support for the CPDB integration (s. https://gerrit.libreoffice.org/c/core/+/169617 ), but is actually a preexisting issue, also reproducible when using the CUPS-based implementation directly.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e3d5b3a5ea384fff2553ede8873be274af0f11f1
CPU threads: 32; OS: Linux 6.9; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2024-08-01 09:24:46 UTC
Pending fix: https://gerrit.libreoffice.org/c/core/+/171371
Comment 2 Commit Notification 2024-08-02 04:48:16 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d6aa340faf5409f1beb50193590b411f515d004

tdf#162289 Update printer info before getting default printer

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.