[QGIS-Developer] pyqgis - layer.saveDefaultStyle() for PostGIS layers

kimaidou kimaidou at gmail.com
Mon Sep 25 00:10:54 PDT 2017


Hi all,

In the "Layer board" plugin, there is a button to save the default style
for each selected layers. To do so, I use the method

layer.saveDefaultStyle()

It seems this method does not work for Postgis layers. I tried manually in
the python console, and I confirm it does not achieve to create (or update)
the default style in the layer_styles table.

I also try to use the other methods, like
layer.saveNamedStyle(layer.styleURI())
with no more success.

Has anyone a clue about this issue ?

nb: I tested it only inside QGIS 2.18.13

Regards,
Michaƫl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170925/3e97f694/attachment.html>


More information about the QGIS-Developer mailing list