Bug report #18584

Feature label not displayed unless layer is editable

Added by Nathan Perry over 6 years ago. Updated over 5 years ago.

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

Description

In a layer I am using, there is one specific feature whose label is not displayed unless the layer is editable. To reproduce:

1. Open a new project
2. Load the attached vector layer (shapefile)
3. Zoom to the feature "Richard B Russell Lake"
4. Toggle layer editing on
5. Show labels for the layer by "NAME" (or any populated field)—the label appears
6. Toggle layer editing off—the label disappears

If you toggle editing on again, the label will not appear immediately, but it will the next time the map is rendered (as long as the layer is still editable).

If you zoom in closer than about 1:30,000, the feature's label will appear even if the layer is not editable. I also notice that the adjacent feature, "J Strom Thurmond Reservoir", will also lose its label if you zoom out past 1:300,000. Selecting "always show" in Labeling settings does not have an effect.

I have run the Check Validity algorithm, as well as Topology Checker, to ensure the feature's geometry is valid. This issue is present in version 3.0 but also occurred in 2.18.

Archive.zip - Shapefile layer (2.95 MB) Nathan Perry, 2018-03-29 05:39 PM

History

#1 Updated by Nathan Perry over 6 years ago

UPDATE: I've found that unchecking "Simplify geometry" in Layer Properties->Rendering solves the problem. It appears that labels would not display for certain features beyond various zoom levels, depending on the complexity of the feature's geometry. Because this specific feature is very complex, its label would disappear at a relatively large scale, while others would not disappear until well into the millions.

Will leave status as "open" in case this still amounts to a bug. (Not sure if "Simplify geometry" is intended to make labels disappear.)

#2 Updated by matteo ghetta over 5 years ago

  • Status changed from Open to Closed

Tested with QGIS 3.4 and it is working fine.

Also available in: Atom PDF