File tree 1 file changed +3
-3
lines changed
python/plugins/processing/algs/qgis
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 28
28
from processing .core .GeoAlgorithm import GeoAlgorithm
29
29
from processing .core .parameters import ParameterVector
30
30
from processing .core .outputs import OutputVector
31
- from processing .tools import dataobjects , vector
31
+ from processing .tools import dataobjects
32
32
33
33
34
34
class SaveSelectedFeatures (GeoAlgorithm ):
@@ -55,8 +55,8 @@ def processAlgorithm(self, feedback):
55
55
writer = output .getVectorWriter (vectorLayer .fields (),
56
56
vectorLayer .wkbType (), vectorLayer .crs ())
57
57
58
- features = vector . features ( vectorLayer )
59
- total = 100.0 / len ( features )
58
+ features = vectorLayer . selectedFeaturesIterator ( )
59
+ total = 100.0 / int ( vectorLayer . selectedFeatureCount () )
60
60
for current , feat in enumerate (features ):
61
61
writer .addFeature (feat )
62
62
feedback .setProgress (int (current * total ))
You can’t perform that action at this time.
0 commit comments