Thanks Nyali.
The reason is that if I use processing it doens't work correctly.
In details, if I write:
import processing
processing.runalg("qgis:multiparttosingleparts", input1, output1)
The plugin runs correctly only the FIRST time.
Then, when it finishes, if I run again the plugin choosing an input2
vectorlayer, the processing algorithm doesn't see the input2 and my ouput
remains output1.
It's crazy!
It's something like a bad refresh..
If you have another solution....
Thank you very much.
Stefano
----- Messaggio originale -----
Da: "Nyall Dawson" <[email protected]>
A: "Stefano Masera" <[email protected]>
Cc: "qgis-developer" <[email protected]>
Inviato: Martedì, 13 giugno 2017 10:20:31
Oggetto: Re: [QGIS-Developer] multipartToSingleParts via code
On 13 June 2017 at 17:49, Stefano Masera
<[email protected]> wrote:
> Hi Nyali,
> in a few words I want to do a multipartToSingleParts (for a VectorLayer) via
> code without using the processing module.
Any particular reason why?
In any case, I'd suggest copying the code used by processing:
https://github.com/qgis/QGIS/blob/release-2_18/python/plugins/processing/algs/qgis/MultipartToSingleparts.py#L66
Nyall
--
Questo messaggio e' stato analizzato ed e' risultato non infetto.
This message was scanned and is believed to be clean.
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer