[QGIS-Developer] PyQGIS: intermittent failure to detect label buffer

Tom Chadwin tom.chadwin at nnpa.org.uk
Tue May 1 05:56:39 PDT 2018


I have a vector layer, labelled, with a buffer on the label. I repeatedly run
the following script:

labelling = iface.activeLayer().labeling()
palyr = labelling.settings()
buffer = palyr.format().buffer().enabled()
if buffer:
    print("buffer")
else:
    print("no buffer")

Here's the output:

exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmpjp0zwd85.py'.encode('utf-8')).read())
no buffer
exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmp1djndmha.py'.encode('utf-8')).read())
no buffer
exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmpe4dewd8m.py'.encode('utf-8')).read())
buffer
exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmp5rkopme3.py'.encode('utf-8')).read())
no buffer
exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmpukexty67.py'.encode('utf-8')).read())
no buffer
exec(open('C:/Users/tchadwin/AppData/Local/Temp/tmpqvgu0j9z.py'.encode('utf-8')).read())
buffer



-----
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list