Skip to content

Commit

Permalink
Fix v.external default configuration and handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric RIBREUX committed Jan 7, 2018
1 parent 5a3a0da commit 0f1cb25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -430,7 +430,7 @@ def processInputs(self, parameters, context):
paramName, parameters, context)
else:
self.loadVectorLayerFromParameter(
paramName, parameters, context)
paramName, parameters, context, None)
# For multiple inputs, process each layer
elif isinstance(param, QgsProcessingParameterMultipleLayers):
layers = self.parameterAsLayerList(parameters, paramName, context)
Expand All @@ -441,7 +441,7 @@ def processInputs(self, parameters, context):
self.loadRasterLayer(layerName, layer)
# Add a vector layer
elif layer.type() == QgsMapLayer.VectorLayer:
self.loadVectorLayer(layerName, layer)
self.loadVectorLayer(layerName, layer, None)

self.postInputs()

Expand Down
Expand Up @@ -70,11 +70,13 @@ def load(self):
self.tr('Location of GRASS docs'),
Grass7Utils.grassHelpPath()))
# Add a setting for using v.external instead of v.in.ogr
# But set it to False by default because some algorithms
# can't be used with external data (need a solid v.in.ogr).
ProcessingConfig.addSetting(Setting(
self.name(),
Grass7Utils.GRASS_USE_VEXTERNAL,
self.tr('For vector layers, use v.external (faster) instead of v.in.ogr'),
True))
False))
ProcessingConfig.readSettings()
self.refreshAlgorithms()
return True
Expand Down

0 comments on commit 0f1cb25

Please sign in to comment.