Bug report #16353
regression: opening raster layer properties window fails to load layer min/max values
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Even Rouault | ||
Category: | Rasters | ||
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 |
Description
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
Additional information
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.
History
#1 Updated by Giovanni Manghi almost 8 years ago
- Status changed from Open to Feedback
Does this effectively affects only master/qgis3 or also previous versions?
#2 Updated by Mathieu Pellerin - nIRV almost 8 years ago
This only affects master (2.99 to become 3.0) as it is a regression linked to the revamped raster min/max widget. I've just tested and confirmed that the issue does not occur on QGIS <= 2.18.
#3 Updated by Even Rouault over 7 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 over 7 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.