[Qgis-developer] Adding symbols through API needs QGIS restarts to show up
Akbar Gumbira
akbargumbira at gmail.com
Tue Jul 12 10:49:58 PDT 2016
Hi,
I am trying to add symbols/colorramps through Python API and I have a
problem that after adding symbol/colorramps, the added symbols/colorramps
don't show up in Style Manager right away. The symbols are added in the
symbology-ng-style.db, but the added symbols show up once I restart QGIS
This is more or less the code:
style_manager = QgsStyleV2()
> style_manager.load(QgsApplication.userStyleV2Path())
> # Adding symbols here
> style_manager.addSymbol(symbol_name, symbol, True)
> # Perhaps this works, load the db again
> style_manager.load(QgsApplication.userStyleV2Path())
Is there something in the API that I could call to trigger the dialog to
show up the changes after adding the symbols?
--
*-------------------*
*Akbar Gumbira *
*www.akbargumbira.com <http://www.akbargumbira.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160712/c37bbd94/attachment.html>
More information about the Qgis-developer
mailing list