[Qgis-developer] More python renderer V2 plugin questions!!

Martin Dobias wonder.sk at gmail.com
Thu Jan 21 10:51:58 EST 2010


On Thu, Jan 21, 2010 at 1:01 AM, Chris Crook <ccrook at linz.govt.nz> wrote:
> Hi
>
> I've got a python renderer almost working, apart from a fatal crash when I
> try to apply it to a layer!  Hopefully I'll get that sorted soon :-)

When creating a sample renderer, I've also experienced few crashes:
most often the reason was an exception thrown from python which caused
invalid behaviour in c++ code. You can try to wrap the "bad" python
code in a try/except block to find out what goes wrong.


> Can I configure the renderer so that it is not presented as an option for
> line and polygon layers.  It is only appropriate for point layers, so
> ideally it shouldn't show in the dialog for other layer types.  I guess the
> least I can do is show an error dialog box if it is selected for other
> types?

Setting renderer to support only certain type of features is not
possible now. Your suggestion will work fine.

Martin


More information about the Qgis-developer mailing list