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

Chris Crook ccrook at linz.govt.nz
Sun Jan 24 01:29:35 EST 2010


Thanks for the advice Martin.

In my case the crashes were due to a careless omission of a return statement in the SymbolLayer clone function.  I guess quantum ended up trying to dereference a null pointer.

Chris
________________________________________
From: Martin Dobias [wonder.sk at gmail.com]
Sent: 22 January 2010 04:51
To: Chris Crook
Cc: qgis-developer at lists.osgeo.org
Subject: Re: [Qgis-developer] More python renderer V2 plugin questions!!

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
______________________________________________________________________________________________________

This message contains information, which is confidential and may be subject to legal privilege. 
If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.
If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message.
LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.

Thank you.
______________________________________________________________________________________________________


More information about the Qgis-developer mailing list