File tree 2 files changed +7
-4
lines changed
python/plugins/processing
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,11 @@ def __init__(self):
173
173
174
174
folder = os .path .join (os .path .dirname (__file__ ), 'scripts' )
175
175
scripts = ScriptUtils .loadFromFolder (folder )
176
- for script in scripts :
177
- script ._icon = self ._icon
176
+ for script in scripts :
178
177
script .allowEdit = False
179
178
self .alglist .extend (scripts )
179
+ for alg in self .alglist :
180
+ alg ._icon = self ._icon
180
181
181
182
def initializeSettings (self ):
182
183
AlgorithmProvider .initializeSettings (self )
Original file line number Diff line number Diff line change 53
53
54
54
55
55
class GeoAlgorithm :
56
+
57
+ _icon = QtGui .QIcon (os .path .dirname (__file__ ) + '/../images/alg.png' )
56
58
57
59
def __init__ (self ):
58
60
# Parameters needed by the algorithm
@@ -104,11 +106,11 @@ def getCopy(self):
104
106
# methods to overwrite when creating a custom geoalgorithm
105
107
106
108
def getIcon (self ):
107
- return QtGui . QIcon ( os . path . dirname ( __file__ ) + '/../images/alg.png' )
109
+ return self . _icon
108
110
109
111
@staticmethod
110
112
def getDefaultIcon ():
111
- return QtGui . QIcon ( os . path . dirname ( __file__ ) + '/../images/alg.png' )
113
+ return GeoAlgorithm . _icon
112
114
113
115
def help (self ):
114
116
"""Returns the help with the description of this algorithm.
You can’t perform that action at this time.
0 commit comments