7

I'm using QGIS 3.2 and want to manually move a few labels on a layer but when I try to use the move labels tool I can't move them. I can however rotate and change them using those tools. I looked in the Auxilliary Storage and it seems like the move tool is not creating new fields for the movement whereas the rotation and change tools can. Is there any reason the move isn't working while the others area?

1
  • The auxiliary fields are a relatively new feature (new since 3.0), so you're probably experiencing a bug. You can make a bug report (check first to make sure it's not already been reported).
    – csk
    Commented Jul 26, 2018 at 18:35

5 Answers 5

19

I had the same problem and opening the layer property, I saw the coordinates of the label apearing in red :

label coordinates

By clicking on the menu (on the red icone) and selecting "store data in the project", I was able to solve the problem and move the labels. I hope it works for you as well !

12

This bug is still present in version 3.6.2.

You need to open the Layer Property, click on each of the data defined coordinates X and Y: screen1

and select the "store data in project" box: screen2

5

This is a known bug. It was reported for QGIS 3.0.3 and was fixed, but it re-appeared in 3.2.1.

Your options are:

  1. Wait for a bug fix.

  2. Revert to QGIS 3.2.0 - download old version of QGIS here.

  3. Use a static field for data-defined label positions.

    Create fields called "LabelX" and "LabelY", with Field Calculator expressions x($geometry) and y($geometry), respectively. Set these fields to control the label position.

    With the layer in editing mode, try using the Move Label tool - hopefully it will re-position the labels and change the "LabelX" and "LabelY" values. If not, you'll have to position your labels by manually editing the values in these fields.

6
  • Thanks, I did know about the bug in earlier versions but I didn't realize it had resurfaced. I'll have to use the workaround for now.
    – Azrie
    Commented Jul 27, 2018 at 20:01
  • It seems to be present in 3.4 even though the issue is closed on Github. Commented Feb 12, 2019 at 14:15
  • This is not the place for a bug report, if you discover that a closed bug is still occurring please update the bug report itself.
    – csk
    Commented Feb 14, 2019 at 18:02
  • I had the same issue in 3.6.2 $x and $y didn't work, but x($geometry) and y($geometry) did, and I could reposition using the tools afterwords. Commented Sep 20, 2019 at 1:04
  • My mistake. $x and $y only work for point layers.
    – csk
    Commented Sep 20, 2019 at 15:48
1

I find that this problem occurs in cases where you have selected "Store Data in Project", and you have modified the label using the "Change label" button on the tool bar. So one can either go back to the old way where you do not "store data in project"; or if you are storing your data in the project, and you need to modify a label, make the change by opening the attribute table and changing it there. Then everything seems to work out ok!

1

I don't have enough reputation to comment on @MaT's answer, but this is what worked for me with QGIS 3.18.3. I am posting just to add that I noticed the issue only appeared on layers where I pasted label styling from another layer, so I supposed this might be a feature to make sure the pasted styling stays untouched, but it's not exactly trivial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.