-
-
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.
qgsrasterlayerrenderer: Change the logic to refresh the renderers
This replaces the existing logic in `QgsRasterLayerRenderer` which calls `QgsRasterLayer::refreshRendererIfNeeded()` to refresh the renderer associated `QgsRasterLayerRenderer` and the raster associated with `QgsRasterLayer`. It also makes GUI updates. With this approach, the following new logic is done: 1. `QgsRasterRenderer::needsRefresh()` is called to check if `rasterRenderer` needs to be updated. 2. If a refresh is needed, the new min/max values are computed by calling `QgsRasterLayer::computeMinMax()` 3. The min/max values are used to refresh `rasterRenderer` 4. The min/max values are stored in a `QgsRenderedLayerStatistics` and propagated to `QgisApp` 5. In QgisApp, `QgsRenderedLayerStatistics` is used to refresh the renderer of `QgsRasterLayer` and force a refresh of the style and the legend if the change comes from the main canvas.
- Loading branch information
1 parent
76cbf8b
commit e123726
Showing
5 changed files
with
79 additions
and
6 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