Bug report #17656

Label expressions are discarded when the "No labels" option is selected

Added by Tudor Bărăscu almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Affected QGIS version:master Regression?:Yes
Operating System:Debian Buster Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25553

Description

In QGIS 2, the label expressions are kept in the project after deactivation and can be easily brought back by selecting the "Show labels for this layer option".

In Master (2.99), selecting the "No labels" option drops them completely and they cannot be recovered from the project.

Steps to reproduce:

- add label expression
- select "No labels" option (they are discarded)
- selecting the "Show labels for this layer option" doesn't bring them back
-

Associated revisions

Revision aa0d3771
Added by Nyall Dawson almost 7 years ago

Add separate bool for controlling whether vector layer labels
are enabled

Instead of clearing the labeling configuration in order to
disable labels, we need a way to disable them without
losing the configuration. Labels are oftern temporarily
switched on/off as an analysis tool, and we don't want the
settings to be lost as a result

Refs #17656

History

#1 Updated by Tudor Bărăscu almost 7 years ago

Better reproduce steps:

Steps to reproduce:

- add label expression
- select "No labels" option (they are discarded)
- Save the project
- reopen the project
- selecting the "Show labels for this layer option" doesn't bring them back

#2 Updated by Nyall Dawson almost 7 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in master

Also available in: Atom PDF