[Qgis-developer] symbol.symbolLayer(n) triggers RTTI error in one place, but doesn't in another

Tom Chadwin tom.chadwin at nnpa.org.uk
Mon Nov 21 03:03:51 PST 2016


QGIS 2.18, qgis2web leafletRefactor branch 
(https://github.com/tomchadwin/qgis2web/tree/leafletRefactor).

- open a point layer
- change marker type to SVG
- start qgis2web
- OpenLayers 3 preview works
- click Leaflet in plugin dialog
- RTTI error

The error is triggered by:

 sl = symbol.symbolLayer(0)
(https://github.com/tomchadwin/qgis2web/blob/leafletRefactor/leafletStyleScripts.py#L67)

However, these lines in the OpenLayers 3 export code does not trigger the
RTTI error:

for i in xrange(symbol.symbolLayerCount()):
    sl = symbol.symbolLayer(i)
(https://github.com/tomchadwin/qgis2web/blob/leafletRefactor/olwriter.py#L851)

I just don't understand how the same method - symbol.symbolLayer(n) - can
trigger the error in one place but not in the other (with everything
identical in QGIS).

Matthias has removed the problem by removing the dependence of the SIP
symbol bindings on RTTI (https://github.com/qgis/QGIS/commit/c3852c0).
However, I still wonder if I can work around the issue, given that the
OpenLayers call to symbol.symbolLayer(n) doesn't trigger the error.

If I can work around it, I could maintain qgis2web compatibility back to 2.8
as I currently do. Otherwise, I'll have to switch to 2.18, and I don't like
not supporting LTR (or I'll have to ask for c3852c0 to be backported to
2.14).

Does anyone have any ideas?

Thanks

Tom



-----
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/symbol-symbolLayer-n-triggers-RTTI-error-in-one-place-but-doesn-t-in-another-tp5296740.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list