Bug report #20409

Error on apply qml style for a raster layer in 3.4.1 and Master 0ea86bf0a5

Added by Antonio Viscomi over 5 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.4.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28229

Description

New description:

After loading a saved QML style, this changes to a different one when clicking on "apply". Data, style and screencast attached.

Old description:
in 2.18.25 it works fine with the same data and qml
in 3.4.1 and Master 0ea86bf0a5 it don't works
I attach a screencast, data and qml file

qml_style.7z (3.07 MB) Antonio Viscomi, 2018-11-08 12:52 PM

qml_style2.avi (4.23 MB) Antonio Viscomi, 2018-11-08 05:24 PM

sl_raster_rec_350.qml (1.79 KB) Antonio Viscomi, 2018-11-08 05:44 PM

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

was the qml created in 2.18?

#2 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

was the qml created in 2.18?

yes
I also noticed that, when I load a qml in 3.4.1 an Master (regardless of whether it was created with 3.4, 3.5 or 2.x) ,
"visualization type" It automatically switch on "palette"
even if the style had been saved in pseudo color mode

#3 Updated by Giovanni Manghi over 5 years ago

I also noticed that, when I load a qml in 3.4.1 an Master (regardless of whether it was created with 3.4, 3.5 or 2.x) ,
"visualization type" It automatically switch on "palette"
even if the style had been saved in pseudo color mode

this is a different issue (I think) please file a different ticket (with sample data and style), thanks.

#4 Updated by Giovanni Manghi over 5 years ago

I also noticed that, when I load a qml in 3.4.1 an Master (regardless of whether it was created with 3.4, 3.5 or 2.x) ,
"visualization type" It automatically switch on "palette"
even if the style had been saved in pseudo color mode

just tried this in qgis master and can't confirm.

#5 Updated by Giovanni Manghi over 5 years ago

  • Regression? changed from Yes to No
  • Operating System deleted (windows 7)
  • Description updated (diff)
  • Status changed from Feedback to Open
  • Priority changed from High to Normal

#6 Updated by Martin Dobias over 5 years ago

I think this a consequence of removal of the "Load" button to load min/max values from raster layer properties in https://github.com/qgis/QGIS/pull/3871 - it was changed to load min/max when Apply is clicked which I think here interferes with the newly loaded style (once the new min/max values are loaded, the classification is auto-updated from the current color ramp). My preference would be to have the "Load" button back so it is not tied to Apply which is somehow unexpected.

side tip: after loading QML style, you do not need to click Apply or OK. Just press Cancel button and the loaded style should stay... hard to say whether that's a bug or a feature :-)

#7 Updated by Giovanni Manghi over 5 years ago

Martin Dobias wrote:

I think this a consequence of removal of the "Load" button to load min/max values from raster layer properties in https://github.com/qgis/QGIS/pull/3871 - it was changed to load min/max when Apply is clicked which I think here interferes with the newly loaded style (once the new min/max values are loaded, the classification is auto-updated from the current color ramp). My preference would be to have the "Load" button back so it is not tied to Apply which is somehow unexpected.

+1

side tip: after loading QML style, you do not need to click Apply or OK. Just press Cancel button and the loaded style should stay... hard to say whether that's a bug or a feature :-)

... is at the very minimum a very bad ux, borderline bug.

#8 Updated by Antonio Viscomi over 5 years ago

Martin Dobias wrote:

side tip: after loading QML style, you do not need to click Apply or OK. Just press Cancel button and the loaded style should stay... hard to say whether that's a bug or a feature :-)

is not to contradict you but if I press close button appear what you see in the screencast named qml_style2

#9 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

I also noticed that, when I load a qml in 3.4.1 an Master (regardless of whether it was created with 3.4, 3.5 or 2.x) ,
"visualization type" It automatically switch on "palette"
even if the style had been saved in pseudo color mode

this is a different issue (I think) please file a different ticket (with sample data and style), thanks.

I think is not a issue but the prefixed behavior for new style manager

#10 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

I also noticed that, when I load a qml in 3.4.1 an Master (regardless of whether it was created with 3.4, 3.5 or 2.x) ,
"visualization type" It automatically switch on "palette"
even if the style had been saved in pseudo color mode

just tried this in qgis master and can't confirm.

the screencasts was recorded on Master 8125366d65

#11 Updated by Giovanni Manghi over 5 years ago

the screencasts was recorded on Master 8125366d65

I'm referring to the second issue, the one that is not part of the description of this ticket (you added as a comment).

#12 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

the screencasts was recorded on Master 8125366d65

I'm referring to the second issue, the one that is not part of the description of this ticket (you added as a comment).

ah ok,
then I need to refile the second one as a new Issue?

#13 Updated by Antonio Viscomi over 5 years ago

Antonio Viscomi wrote:

New description:

After loading a saved QML style, this changes to a different one when clicking on "apply". Data, style and screencast attached.

I attach the qml saved by Master

#14 Updated by Giovanni Manghi over 5 years ago

I attach the qml saved by Master

is not a matter of qml, explanation has been give here in #20409-6

#15 Updated by Giovanni Manghi over 5 years ago

ah ok,
then I need to refile the second one as a new Issue?

you sure about it? I can't confirm here.

#16 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

ah ok,
then I need to refile the second one as a new Issue?

you sure about it? I can't confirm here.

Yes, I do
Because in screencast qml_style2 it appear this... But I'm not sure It is an issue

#17 Updated by Giovanni Manghi over 5 years ago

Yes, I do
Because in screencast qml_style2 it appear this... But I'm not sure It is an issue

the only issue I see (in your cast) is that when loading the style it is applied correclty it does not switch to "palletted". If you close the properties and reopen them it shows correctly "palletted", is it?

#18 Updated by Antonio Viscomi over 5 years ago

Giovanni Manghi wrote:

Yes, I do
Because in screencast qml_style2 it appear this... But I'm not sure It is an issue

the only issue I see (in your cast) is that when loading the style it is applied correclty it does not switch to "palletted". If you close the properties and reopen them it shows correctly "palletted", is it?

Yes, even if the style is saved by 3.5 in pseudocolor mode when you load it or open it again It automatically switches to palette

#19 Updated by Antonio Viscomi over 5 years ago

this issue appears even in the case of a reclassification of a raster making vain the same reclassification

Also available in: Atom PDF