Bug report #16353
regression: opening raster layer properties window fails to load layer min/max values
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24263|
I'm not sure when this regression slipped into QGIS but I suspect it is linked to commit 532eb58d1f4003a (which revamped the way raster min/max values were computed). When opening a raster layer properties window, the min / max values are reset to QGIS' default min/max load settings (i.e., 2% - 98% of whole raster), irrespective of the tweaks done by users via the style dock, or even via previous layer properties window edit.Steps to reproduce
- Open QGIS and add a 3-band raster
- Zoom into the raster to only show a part of it, and open the style dock
- Change the min/max value computation to canvas' current extent
- Take note of the updated min / max values for the three bands
- Open the raster layer's properties window, and go to the style panel
- Notice the min / max values are reset to default values, ignoring the change you've just made via style dock
The problem is actually worse than stated in the subject. The histogram panel / tab is effectively broken, with min / max retrieval and setting non-functional.
#3 Updated by Even Rouault almost 5 years ago
Did you set the contrast enhancement to something else than None ? If not, that might explain the behaviour you see. But I also see it in 2.18.
Otherwise, I've just fixed related issues in
#ef26d95007920fd540bcdac0c05bac1f9d925dce that perhaps fix this issue ?
I've a hard time to make sense of how to use the histogram panel, so I'm not sure when things work or not in it... I don't think I touched it, but the GUI interaction with notifications everywhere (and the GUI sometimes modifying state of non GUI objects in places where you wouln't expect it) are a horrible mess to decypher.
#4 Updated by Mathieu Pellerin - nIRV almost 5 years ago
- Resolution set to fixed/implemented
- % Done changed from 0 to 100
- Status changed from Feedback to Closed
Even, your latest commit did fix loading of renderer's min/max value through layer properties window, thanks. And yeah, that part of the code is a bit of a nightmare.
Closing this issue as fixed.