Bug report #14224

"Label with" Field is not loaded when importing qgis layer style file

Added by Johannes Wagner almost 9 years ago. Updated over 8 years ago.

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

Description

1. Create a specific rule for labeling in the "lable with" field
2. export the entire layer style to a qgis layer style file (qml)
3. Create a new layer, import the style, the Label with field is not filled.

It is, in fact, being filled in the background, so when I close the Layer Properties instead of pressing OK to confirm, everything is in place afer I reopen the layer properties.
However most people will press Ok or Apply to confirm what they did, effectively overwriting what they just imported.

I could only test on this on Mac OS so far, so it may be a Mac related issue.
(The qml file is written correctly)

Step1__Save_file_style_of_this_shape.PNG - My first style with blue label on 'name' attribute (63.4 KB) Herve Christol, 2016-03-31 05:56 AM

Step2__change_symbol_and_label_style.PNG - Me second style with red label on 'id' attribute (57.4 KB) Herve Christol, 2016-03-31 05:56 AM

Step3__Restore_previous_file_style___symbole_is_ok_but_not_label.PNG - Badly restored first style :-( (57.7 KB) Herve Christol, 2016-03-31 05:56 AM

Associated revisions

Revision 272b16a7
Added by Daan Goedkoop over 8 years ago

Update labeling settings in UI after loading style from file (fixes #14224)

Revision c260a77e
Added by Matthias Kuhn over 8 years ago

Merge pull request #3054 from dgoedkoop/loadstylelabels214

[Bugfix] Update labeling settings after loading style from file (fixes #14224)

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Category set to Labelling
  • Status changed from Open to Feedback

seems ok to me in master, please give it a try and report back. Cheers!

#2 Updated by Johannes Wagner over 8 years ago

Fork under windows seems to be ok,
I am using KyngChaos Mac Os version http://www.kyngchaos.com/software/qgis though and can reprocude the issue with several different macs..
all the best!

#3 Updated by Herve Christol over 8 years ago

I have the same issue on Qgis 2.14.1 (Linux debian).
Label style is not properly restored whereas the symbol style is correct.
I confirm that the cancel button is the only way to restore properly the label style.

#4 Updated by R. R. over 8 years ago

See bug report #14441

#5 Updated by Giovanni Manghi over 8 years ago

  • Operating System deleted (Mac OS)
  • Status changed from Feedback to Open

see also #14441

#6 Updated by Daan Goedkoop over 8 years ago

The workaround of clicking "cancel" does not work in master anymore, because of the 25a162c.

I've made a PR to fix this a while ago already (https://github.com/qgis/QGIS/pull/2929), I'll try to update it soon to solve the merge conflict.

#7 Updated by Daan Goedkoop over 8 years ago

The aforementioned commit was backported to the 2.14 branch, so the workaround probably also doesn't work anymore in 2.14.2.

#8 Updated by Anonymous over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF