Bug report #18153

When loading a raster style from .qml the resampling options are not read in correctly.

Added by Alister Hood almost 7 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:26046

Description

The resampling options are saved correctly when creating a "default style" .qml file, and are correctly loaded when adding a layer which has a .qml file alongside it.

They are not loaded correctly when loading a .qml file via the layer properties dialog.
i.e. when you load a style using the "layer properties" dialog it initially renders using the zoomed in and out resampling options stored in the qml file, but the settings displayed in the dialog remain the same as they were before you loaded the style. Then when you click "apply" the layer is re-rendered with the settings from the dialog.

raster.zip (1.71 KB) matteo ghetta, 2018-05-18 02:45 PM

History

#1 Updated by Alessandro Pasotti over 6 years ago

  • Status changed from Open to Feedback

Would you please add a minimal test project and qml file to reproduce this issue?

#2 Updated by matteo ghetta over 6 years ago

I confirm this issue. I attach a simple reclassified raster with a qml file. When loading this raster, the style is automatically loaded, but with a small tweak on some option (interpolation, min/max, etc) the displayed color ramp in the combobox is loaded and the loaded stile is gone.

#3 Updated by Alister Hood over 6 years ago

Sorry guys, I seem to have missed the notifications for a few issues several months back. I can come back later with a test case.

Matteo, this ticket is very specific about the resampling setting not being read into the dialog.
It sounds like you have a completely different issue (which has also been reported). By any chance was your qml file produced by QGIS 2.x, but you are using it in 3.x?

#4 Updated by Alister Hood over 6 years ago

Alister Hood wrote:

It sounds like you have a completely different issue (which has also been reported). By any chance was your qml file produced by QGIS 2.x, but you are using it in 3.x?

Sorry, I didn't quite remember that right. It was suggested in the comments on #17102 (I'm guessing you actually came here from that ticket) that I could report that as a new issue, but also that people may not be likely to actually work on fixing it.
I didn't file another ticket for it and I haven't checked whether anyone else has. You may want to file a ticket yourself.

#5 Updated by Alister Hood over 6 years ago

  • Status changed from Feedback to Closed
  • Resolution set to worksforme

This issue appears to be fixed in 3.0.2

#6 Updated by Alister Hood almost 6 years ago

Alister Hood wrote:

Alister Hood wrote:

It sounds like you have a completely different issue (which has also been reported). By any chance was your qml file produced by QGIS 2.x, but you are using it in 3.x?

Sorry, I didn't quite remember that right. It was suggested in the comments on #17102 (I'm guessing you actually came here from that ticket) that I could report that as a new issue, but also that people may not be likely to actually work on fixing it.
I didn't file another ticket for it and I haven't checked whether anyone else has. You may want to file a ticket yourself.

I have filed it as #21108, as I believe no one else has filed it.

Also available in: Atom PDF