Skip to content

Commit

Permalink
Revert "[processing] cache icons to speed up toolbox rendering"
Browse files Browse the repository at this point in the history
This reverts commit d265f33.

Was causing failure on Travis
  • Loading branch information
nyalldawson committed Sep 13, 2016
1 parent 26d7235 commit 5617dbc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
15 changes: 7 additions & 8 deletions python/plugins/processing/algs/grass/GrassAlgorithm.py
Expand Up @@ -66,7 +66,6 @@
pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))

_icon = QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))

class GrassAlgorithm(GeoAlgorithm):

Expand All @@ -90,10 +89,9 @@ def getCopy(self):
newone = GrassAlgorithm(self.descriptionFile)
newone.provider = self.provider
return newone

def getIcon(self):
return _icon

return QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))

def help(self):
return False, 'http://grass.osgeo.org/grass64/manuals/' + self.grassName + '.html'
Expand Down Expand Up @@ -123,10 +121,11 @@ def defineCharacteristicsFromFile(self):
line = lines.readline().strip('\n').strip()
self.grassName = line
line = lines.readline().strip('\n').strip()
self.name = line.split("-")[0]
#self.i18n_name = QCoreApplication.translate("GrassAlgorithm", self.name)
self.name = self.grassName
self.i18n_name = self.grassName
self.name = line
self.i18n_name = QCoreApplication.translate("GrassAlgorithm", line)
if " - " not in self.name:
self.name = self.grassName + " - " + self.name
self.i18n_name = self.grassName + " - " + self.i18n_name
line = lines.readline().strip('\n').strip()
self.group = line
self.i18n_group = QCoreApplication.translate("GrassAlgorithm", line)
Expand Down
5 changes: 2 additions & 3 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -65,7 +65,6 @@
pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))

_icon = QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))

class Grass7Algorithm(GeoAlgorithm):

Expand Down Expand Up @@ -99,8 +98,8 @@ def getCopy(self):
return newone

def getIcon(self):
return _icon
return QIcon(os.path.join(pluginPath, 'images', 'grass.svg'))

def help(self):
localDoc = None
html = self.grass7Name + '.html'
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/otb/OTBAlgorithm.py
Expand Up @@ -51,7 +51,6 @@
pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))

_icon = QIcon(os.path.join(pluginPath, 'images', 'otb.png'))

class OTBAlgorithm(GeoAlgorithm):

Expand All @@ -74,7 +73,7 @@ def getCopy(self):
return newone

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

def help(self):
version = OTBUtils.getInstalledVersion()
Expand Down
5 changes: 2 additions & 3 deletions python/plugins/processing/algs/saga/SagaAlgorithm212.py
Expand Up @@ -57,7 +57,6 @@

sessionExportedLayers = {}

_icon = QIcon(os.path.join(pluginPath, 'images', 'saga.png'))

class SagaAlgorithm212(GeoAlgorithm):

Expand All @@ -76,8 +75,8 @@ def getCopy(self):
return newone

def getIcon(self):
return _icon
return QIcon(os.path.join(pluginPath, 'images', 'saga.png'))

def defineCharacteristicsFromFile(self):
lines = open(self.descriptionFile)
line = lines.readline().strip('\n').strip()
Expand Down

0 comments on commit 5617dbc

Please sign in to comment.