-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hopefully fix #10599 (blank composer map when rendering rasters)
When printing on Windows, the printing does not seem to work well in the worker thread as QImages get converted to QPixmaps. Therefore we force the map rendering into main thread to avoid the issues. I do not have a printer, so I can't confirm the fix really helps
- Loading branch information
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7aa93c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wonder-sk this seems a bit unfortunate.. Do you think it would be possible to render synchronously only when printing, so that interactions with composer maps remains quick? We could do this via a setting for the composer map (setRenderSynchronously) or via a composition property (forceSynchronousRendering) which is true only when printing?
7aa93c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson It should be still possible to have asynchronous rendering when drawing on screen.
The code in composer right now cannot take advantage of the background rendering anyway - it will require some more code changes to handle it nicely... I.e. instead of waiting until the map is completely rendered, the redraw even will only start the rendering - and when finished, it would trigger update of composer map - similar to how it is done in map canvas.
7aa93c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Martin-SK Ahh, I think I misunderstood (I'm away from my computer and not able to test at the moment). I thought this change disabled multithreaded rendering too.