Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: opening raster layer properties window fails to load layer min/max values #24263

Closed
qgib opened this issue Mar 14, 2017 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Mar 14, 2017

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 16353
Affected QGIS version: master
Redmine category:rasters
Assignee: Even Rouault


I'm not sure when this regression slipped into QGIS but I suspect it is linked to commit 532eb58 (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

  1. Open QGIS and add a 3-band raster
  2. Zoom into the raster to only show a part of it, and open the style dock
  3. Change the min/max value computation to canvas' current extent
  4. Take note of the updated min / max values for the three bands
  5. Open the raster layer's properties window, and go to the style panel
  6. 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.

@qgib
Copy link
Contributor Author

qgib commented Mar 18, 2017

Author Name: Giovanni Manghi (@gioman)


Does this effectively affects only master/qgis3 or also previous versions?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Mar 19, 2017

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


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.

@qgib
Copy link
Contributor Author

qgib commented Mar 29, 2017

Author Name: Even Rouault (@rouault)


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.

@qgib
Copy link
Contributor Author

qgib commented Mar 29, 2017

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


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.


  • resolution was changed from to fixed/implemented
  • done_ratio was changed from 0 to 100
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats) labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant