Fix resolving memory layers when multiple memory layers are used in model

This commit is contained in:
Nyall Dawson 2017-05-02 12:45:54 +10:00
parent 2b1dda4c78
commit b1eecfdba4

View File

@ -557,6 +557,7 @@ def createVectorWriter(destination, encoding, fields, geometryType, crs, context
layer = QgsVectorLayer(uri, destination, 'memory')
sink = layer.dataProvider()
context.temporaryLayerStore().addMapLayer(layer, False)
destination = layer.id()
elif destination.startswith(POSTGIS_LAYER_PREFIX):
uri = QgsDataSourceUri(destination[len(POSTGIS_LAYER_PREFIX):])
connInfo = uri.connectionInfo()