Skip to content
Permalink
Browse files

Remove global processing use selection setting

  • Loading branch information
nyalldawson committed Jun 5, 2017
1 parent 7f68734 commit a6581356936f3af54c6a1d44cc1ec110c37cb0cc
@@ -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:
@@ -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 @@ 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,
@@ -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(),

0 comments on commit a658135

Please sign in to comment.
You can’t perform that action at this time.