Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Allow layers to be automatically refreshed at a specified i…
…nterval This allows users to set a timer interval in layer properties for individual layers. These layers will be automatically refreshed at a matching interval. Canvas updates are deferred in order to avoid refreshing multiple times if more than one layer has an auto update interval set. Additionally, logic has been added to skip any auto redraws of the canvas while the canvas is already being redrawn. This avoids issues caused by setting a layer auto refresh to a shorter time than is required to redraw the canvas.
- Loading branch information
1 parent
9b9d49a
commit 38f87a6
Showing
14 changed files
with
417 additions
and
2 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
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
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
Oops, something went wrong.
38f87a6
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.
The QTimer can only be destroyed from its thread. QgsVectorLayer given to QgsVectorLayerExporterTask with ownership was deleted from QgsVectorLayerExporterTask::run() which is called in another thread. That was resulting in qWarning "Timers cannot be stopped from another thread" and QGIS crashing after a while with useless traceback.
I have fixed that moving
delete mLayer
to QgsVectorLayerExporterTask::finished() in 7b1932a.There are maybe other places where a layer may be deleted from a thread?
38f87a6
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.
@blazek Good catch! I had a look through and the rest of the tasks look safe, except for QgsMapRendererTask. That's fixed in 233a861