Skip to content
Permalink
Browse files
[processing] cache OTB icon to speed up toolbox loading
(partially cherry-picked from cc62c52)
  • Loading branch information
alexbruy committed May 24, 2017
1 parent 5ae723b commit 62d1531c81e9f997ef4baf2b762aeb82030360a0
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/processing/algs/otb/OTBAlgorithm.py
@@ -63,6 +63,7 @@ def __init__(self, descriptionfile):
self.defineCharacteristicsFromFile()
self.numExportedLayers = 0
self.hasROI = None
self._icon = None

def __str__(self):
return("Algo : " + self.name + " from app : " + self.cliName + " in : " + self.group)
@@ -73,7 +74,9 @@ def getCopy(self):
return newone

def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'otb.png'))
if self._icon is None:
self._icon = QIcon(os.path.join(pluginPath, 'images', 'otb.png'))
return self._icon

def help(self):
version = OTBUtils.getInstalledVersion()

0 comments on commit 62d1531

Please sign in to comment.