[processing] fied issue with grass icons slowing down toolbox

fixes #15550
This commit is contained in:
volaya 2016-09-21 13:23:30 +02:00
parent 448961b35d
commit 2fda177c0e
2 changed files with 13 additions and 6 deletions

View File

@ -84,6 +84,7 @@ class GrassAlgorithm(GeoAlgorithm):
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
self.numExportedLayers = 0
self._icon = None
def getCopy(self):
newone = GrassAlgorithm(self.descriptionFile)
@ -91,7 +92,10 @@ class GrassAlgorithm(GeoAlgorithm):
return newone
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))
if self._icon is None:
self._icon = QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))
return self._icon
def help(self):
return False, 'http://grass.osgeo.org/grass64/manuals/' + self.grassName + '.html'

View File

@ -83,6 +83,7 @@ class Grass7Algorithm(GeoAlgorithm):
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
self.numExportedLayers = 0
self._icon = None
self.uniqueSufix = unicode(uuid.uuid4()).replace('-', '')
# Use the ext mechanism
@ -98,7 +99,9 @@ class Grass7Algorithm(GeoAlgorithm):
return newone
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))
if self._icon is None:
self._icon = QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))
return self._icon
def help(self):
localDoc = None