Bug report #4077

Scale Dependent Rendering

Added by Andre Dunn-Johnston almost 13 years ago. Updated over 8 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:14060



After going through a dozen or more layers I had set up all the label settings for each layer, including where it got the label value from, font size, etc. I had also set up scale dependant rendering for each layer, so that text labels wouldn't be shown if you were zoomed out greater than 1:3,000. So when you zoom in close in QGIS all the labels appear, when you zoom out they disappear. Simple right? Well I saved this to a project file and everything was going great, but when I closed down QGIS and re-opened the project I found that although all my label settings for each layer had been saved, all of the layers had scale dependant rendering turned off. This resulted in every single label being shown at the full extents (creating an ugly black mess!).

So it seems that although the settings for labels are saved with a project file, even if scale dependent rending is set for a label and saved, QGIS doesn't save this setting, meaning it defaults to scale dependant rendering turned off - showing all labels.

Hopefully this can be fixed by the next version, thanks!


#1 Updated by Andre Dunn-Johnston over 12 years ago

Anybody had a look at this one yet? Just in case it wasn't clear, I'm currently using version 1.7.0 QGIS (trunk) and getting this problem. I think I entered the details incorrectly by saying "target version" 1.7.0.

#2 Updated by Alexander Clausen over 12 years ago

I just hit this issue too; the problem seems to be that QgsLabel::writeXML does not save mMinScale, mMaxScale and mScaleBasedVisibility

#3 Updated by Alexander Clausen over 12 years ago

Ok, seems like they are handled in QgsVectorLayer::writeSymbology, but only if not mUsingRendererV2. QgsVectorLayer::readSymbology reads them in regardless of mUsingRendererV2

#4 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#5 Updated by Paolo Cavallini about 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0

#6 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#7 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#8 Updated by Médéric RIBREUX over 8 years ago

  • % Done changed from 0 to 100
  • Resolution set to fixed/implemented
  • Status changed from Open to Closed
  • Pull Request or Patch supplied set to No

Hello, bug triage...

in QGIS 2.13 master, all of scale dependent rendering options (for layers and for labels) are saved into the project.

I am closing this bug.

Also available in: Atom PDF