Skip to content

Commit e536905

Browse files
committed
[processing] change icon of core algs
1 parent cded8b1 commit e536905

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,11 @@ def __init__(self):
173173

174174
folder = os.path.join(os.path.dirname(__file__), 'scripts')
175175
scripts = ScriptUtils.loadFromFolder(folder)
176-
for script in scripts:
177-
script._icon = self._icon
176+
for script in scripts:
178177
script.allowEdit = False
179178
self.alglist.extend(scripts)
179+
for alg in self.alglist:
180+
alg._icon = self._icon
180181

181182
def initializeSettings(self):
182183
AlgorithmProvider.initializeSettings(self)

python/plugins/processing/core/GeoAlgorithm.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353

5454

5555
class GeoAlgorithm:
56+
57+
_icon = QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')
5658

5759
def __init__(self):
5860
# Parameters needed by the algorithm
@@ -104,11 +106,11 @@ def getCopy(self):
104106
# methods to overwrite when creating a custom geoalgorithm
105107

106108
def getIcon(self):
107-
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')
109+
return self._icon
108110

109111
@staticmethod
110112
def getDefaultIcon():
111-
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/alg.png')
113+
return GeoAlgorithm._icon
112114

113115
def help(self):
114116
"""Returns the help with the description of this algorithm.

0 commit comments

Comments
 (0)