Bug report #11956

QgsPalLabeling - setShowingAllLabels(True) not working from python

Added by Christophe Damour almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Python plugins
Affected QGIS version:2.6.0 Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20164

Description

setShowingAllLabels(True) doesn't work from python :

myMapRenderer = self.iface.mapCanvas().mapRenderer()
mLBL = QgsPalLabeling()
mLBL.setShowingAllLabels(True)
myMapRenderer.setLabelingEngine(mLBL)
print 'Showing all : ' + str(myMapRenderer.labelingEngine().isShowingAllLabels())
# Return True, but doesn't work

History

#1 Updated by Christophe Damour almost 10 years ago

  • Status changed from Open to Closed

Adding this line solved the problem :

mLBL.saveEngineSettings()

Also available in: Atom PDF