Remove global processing use selection setting

This commit is contained in:
Nyall Dawson 2017-06-05 16:41:08 +10:00
parent 7f687345f8
commit a658135693
3 changed files with 4 additions and 8 deletions

View File

@ -525,8 +525,9 @@ class Grass7Algorithm(GeoAlgorithm):
else:
layer = QgsProcessingUtils.mapLayerFromString(orgFilename, context, False)
if layer:
useSelection = \
ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED)
#TODO
#useSelection = \
# ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED)
if useSelection and layer.selectedFeatureCount() != 0:
filename = dataobjects.exportVectorLayer(layer)
else:

View File

@ -53,7 +53,6 @@ class ProcessingConfig(object):
VECTOR_LINE_STYLE = 'VECTOR_LINE_STYLE'
VECTOR_POLYGON_STYLE = 'VECTOR_POLYGON_STYLE'
SHOW_RECENT_ALGORITHMS = 'SHOW_RECENT_ALGORITHMS'
USE_SELECTED = 'USE_SELECTED'
FILTER_INVALID_GEOMETRIES = 'FILTER_INVALID_GEOMETRIES'
USE_FILENAME_AS_LAYER_NAME = 'USE_FILENAME_AS_LAYER_NAME'
KEEP_DIALOG_OPEN = 'KEEP_DIALOG_OPEN'
@ -84,10 +83,6 @@ class ProcessingConfig(object):
ProcessingConfig.tr('General'),
ProcessingConfig.KEEP_DIALOG_OPEN,
ProcessingConfig.tr('Keep dialog open after running an algorithm'), False))
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
ProcessingConfig.USE_SELECTED,
ProcessingConfig.tr('Use only selected features'), True))
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
ProcessingConfig.USE_FILENAME_AS_LAYER_NAME,

View File

@ -196,7 +196,7 @@ def exportVectorLayer(layer, supported=None):
output = getTempFilenameInTempFolder(basename)
else:
output = getTempFilename("shp")
useSelection = ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED)
useSelection = False # TODO ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED)
if useSelection and layer.selectedFeatureCount() != 0:
writer = QgsVectorFileWriter(output, systemEncoding,
layer.fields(),