@@ -84,14 +84,18 @@ def __init__(self, descriptionfile):
84
84
self .descriptionFile = descriptionfile
85
85
self .defineCharacteristicsFromFile ()
86
86
self .numExportedLayers = 0
87
+ self ._icon = None
87
88
88
89
def getCopy (self ):
89
90
newone = GrassAlgorithm (self .descriptionFile )
90
91
newone .provider = self .provider
91
92
return newone
92
93
93
94
def getIcon (self ):
94
- return QIcon (os .path .join (pluginPath , 'images' , 'grass.svg' ))
95
+ if self ._icon is None :
96
+ self ._icon = QIcon (os .path .join (pluginPath , 'images' , 'grass.svg' ))
97
+ return self ._icon
98
+
95
99
96
100
def help (self ):
97
101
return False , 'http://grass.osgeo.org/grass64/manuals/' + self .grassName + '.html'
@@ -158,7 +162,7 @@ def defineCharacteristicsFromFile(self):
158
162
elif isinstance (output , OutputVector ):
159
163
vectorOutputs += 1
160
164
if isinstance (output , OutputHTML ):
161
- self .addOutput (OutputFile ("rawoutput" , output .description +
165
+ self .addOutput (OutputFile ("rawoutput" , output .description +
162
166
" (raw output)" , "txt" ))
163
167
line = lines .readline ().strip ('\n ' ).strip ()
164
168
except Exception as e :
@@ -180,7 +184,7 @@ def defineCharacteristicsFromFile(self):
180
184
if hasVectorInput :
181
185
param = ParameterNumber (self .GRASS_SNAP_TOLERANCE_PARAMETER ,
182
186
'v.in.ogr snap tolerance (-1 = no snap)' ,
183
- - 1 , None , - 1.0 )
187
+ - 1 , None , - 1.0 )
184
188
param .isAdvanced = True
185
189
self .addParameter (param )
186
190
param = ParameterNumber (self .GRASS_MIN_AREA_PARAMETER ,
0 commit comments