[Qgis-developer] Print composer font pickers are broken

Nyall Dawson nyall.dawson at gmail.com
Sun Feb 22 13:33:23 PST 2015


On 22 February 2015 at 04:31, Anita Graser <anitagraser at gmx.at> wrote:
> Hi,
>
> Please see https://hub.qgis.org/issues/12233:
> Font pickers in print composer don't accept user input - fonts cannot be
> changed. Tested with 2.8 and master from OSGeo4W on Win7 and Win8.
>

Just to fill everyone in, here's how this bug snuck in to release
(I've been offline and am just catching up with developments):

A couple of days before 2.8 release I merged a pull request which
fixed a number of instances were dialog parents were not correctly set
for print composer windows. If you're not aware of how Qt works,
setting the parent window for a dialog allows Qt to correctly position
the dialog in front of the parent window, preventing issues were a
dialog may appear on the wrong monitor for multi-screen setups. It's
the correct thing to do, so it looked like a very harmless and
beneficial PR to merge pre-release. Quick testing showed that the
change did fix issues with dialog window placement, but unfortunately
I didn't test that the dialog behaviour was altered by the change...

... however... making this change meant we got hit with a Qt bug [1]
which causes font dialogs with a parent window set to effectively
discard their results. Arghh! The worst part is that Jürgen had
actually fixed this issue 3 years ago - I should have checked the git
history on the effected files to see if there was an explicit reason
the parent wasn't correctly set for these dialogs.

So, my apologies for the hassle this has caused, and for the extra
work it's made for all involved (sorry Jürgen!)

Nyall

[1] https://bugreports.qt.io/browse/QTBUG-41513


More information about the Qgis-developer mailing list