Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raster layer properties: fix renderer widget that was reset, and fix …
…wrong behaviour on cancel. 2 issues : - when opening the raster layer properties dialog, it used to reset the min/max value to custom values, due to a bad interaction with a recent change in the histogram code (likely introduced in 4f3cf68) - when closing the raster layer properties dialog on a multiband renderer in updated extent mode for example, it got result to whole raster statistics due to QgsRasterLayerProperties::setRendererWidget() reseting stuff. Honestly the code in that method that changes value in the renderer object seems to be completely inappropriate for a method that you would expect to only affects GUI/widgets.
- Loading branch information
Showing
3 changed files
with
14 additions
and
18 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
ef26d95
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.
@rouault , thanks, this effectively made it possible to open a raster layer properties window without messing with the renderer's settings again.
While I have you on the line, I'll highlight another messy situation with raster & min/max computation: when the min/max is computed through "current canvas", subsequently panning around and then changing the raster's brightness / saturation / contrast / resampling mode / etc. through the style dock will trigger an (unwanted) re-calculation of the min/max using a new canvas extent.
Effectively what seems to happen here is that changing any of the above-mentioned values recreates a renderer widget, and triggers a min/max computation.