diff --git a/python/plugins/processing/algs/qgis/Merge.py b/python/plugins/processing/algs/qgis/Merge.py index 74cb4b6f799..920f74db3cf 100644 --- a/python/plugins/processing/algs/qgis/Merge.py +++ b/python/plugins/processing/algs/qgis/Merge.py @@ -61,13 +61,12 @@ class Merge(GeoAlgorithm): def processAlgorithm(self, progress): inLayers = self.getParameterValue(self.LAYERS) - paths = inLayers.split(';') layers = [] fields = QgsFields() totalFeatureCount = 0 - for x in range(len(paths)): - layer = QgsVectorLayer(paths[x], str(x), 'ogr') + for layerSource in inLayers.split(';'): + layer = dataobjects.getObjectFromUri(layerSource) if (len(layers) > 0): if (layer.wkbType() != layers[0].wkbType()):