From 9d9955e272a269515b1c79ccf70dc4ce24614a04 Mon Sep 17 00:00:00 2001 From: nirvn Date: Tue, 1 May 2018 10:42:07 +0700 Subject: [PATCH] [processing] improve eliminate selected polygons alg help i.e., the use only selected option is gone since 3.0 --- python/plugins/processing/algs/help/qgis.yaml | 2 +- python/plugins/processing/algs/qgis/EliminateSelection.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python/plugins/processing/algs/help/qgis.yaml b/python/plugins/processing/algs/help/qgis.yaml index a6dc03c89f6..18b4a9e2dff 100644 --- a/python/plugins/processing/algs/help/qgis.yaml +++ b/python/plugins/processing/algs/help/qgis.yaml @@ -149,7 +149,7 @@ qgis:distancetonearesthub: > The resulting layer can contain only source points with an additional field indicating the distance to the nearest point and the name of the destination point, or lines linking each source point with its nearest destination point. qgis:eliminateselectedpolygons: > - This algorithm combines selected polygons of the input layer with certain adjacent polygons by erasing their common boundary. The adjacent polygon can be either the one with the largest or smallest area or the one sharing the largest common boundary with the polygon to be eliminated. The selected features will always be eliminated whether the option "Use only selected features" is set or not. + This algorithm combines selected polygons of the input layer with certain adjacent polygons by erasing their common boundary. The adjacent polygon can be either the one with the largest or smallest area or the one sharing the largest common boundary with the polygon to be eliminated. Eliminate is normally used to get rid of sliver polygons, i.e. tiny polygons that are a result of polygon intersection processes where boundaries of the inputs are similar but not identical. qgis:exportaddgeometrycolumns: > diff --git a/python/plugins/processing/algs/qgis/EliminateSelection.py b/python/plugins/processing/algs/qgis/EliminateSelection.py index 780120018eb..cc1cbb1fe22 100644 --- a/python/plugins/processing/algs/qgis/EliminateSelection.py +++ b/python/plugins/processing/algs/qgis/EliminateSelection.py @@ -29,7 +29,8 @@ import os from qgis.PyQt.QtGui import QIcon -from qgis.core import (QgsFeatureRequest, +from qgis.core import (QgsApplication, + QgsFeatureRequest, QgsFeature, QgsFeatureSink, QgsGeometry, @@ -57,7 +58,10 @@ class EliminateSelection(QgisAlgorithm): MODE_BOUNDARY = 2 def icon(self): - return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'eliminate.png')) + return QgsApplication.getThemeIcon("/algorithms/mAlgorithmDissolve.svg") + + def svgIconPath(self): + return QgsApplication.iconPath("/algorithms/mAlgorithmDissolve.svg") def group(self): return self.tr('Vector geometry')