Skip to content

Commit

Permalink
Remove global processing use selection setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 5, 2017
1 parent 7f68734 commit a658135
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -525,8 +525,9 @@ def exportVectorLayer(self, orgFilename):
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:
Expand Down
5 changes: 0 additions & 5 deletions python/plugins/processing/core/ProcessingConfig.py
Expand Up @@ -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'
Expand Down Expand Up @@ -84,10 +83,6 @@ def initialize():
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,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/tools/dataobjects.py
Expand Up @@ -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(),
Expand Down

0 comments on commit a658135

Please sign in to comment.