Skip to content

Commit

Permalink
Fix some breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 7, 2017
1 parent 3739c3a commit ff32054
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ def __init__(self, descriptionfile):
self.module = None

def getCopy(self):
newone = Grass7Algorithm(self.descriptionFile)
return newone
return self

def name(self):
return self._name
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/r/RAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class RAlgorithm(GeoAlgorithm):
RPLOTS = 'RPLOTS'

def getCopy(self):
newone = RAlgorithm(self.descriptionFile)
return newone
return self

def __init__(self, descriptionFile, script=None):
GeoAlgorithm.__init__(self)
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ def __init__(self, descriptionfile):
self._group = ''

def getCopy(self):
newone = SagaAlgorithm(self.descriptionFile)
return newone
return self

def icon(self):
if self._icon is None:
Expand Down
1 change: 0 additions & 1 deletion python/plugins/processing/core/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def addScripts(folder):
for script in scripts:
script.allowEdit = False
script._icon = provider._icon
script.provider = provider
provider.externalAlgs.extend(scripts)
provider.refreshAlgorithms()

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class ModelerAlgorithm(GeoAlgorithm):
CANVAS_SIZE = 4000

def getCopy(self):
newone = ModelerAlgorithm()
newone = self

newone.algs = {}
for algname, alg in self.algs.items():
Expand Down
1 change: 0 additions & 1 deletion python/plugins/processing/modeler/ModelerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ def fillAlgorithmTreeUsingProviders(self):

if len(groups) > 0:
providerItem = QTreeWidgetItem()
provider = QgsApplication.processingRegistry().providerById(provider_id)
providerItem.setText(0, provider.name())
providerItem.setToolTip(0, provider.name())
providerItem.setIcon(0, provider.icon())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def flags(self):
return QgsProcessingAlgorithm.FlagHideFromModeler

def getCopy(self):
newone = PreconfiguredAlgorithm(self.descriptionFile)
newone = self
newone.outputs = []
newone._name = self._name
newone._group = self._group
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/script/ScriptAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, descriptionFile, script=None):
self.defineCharacteristicsFromFile()

def getCopy(self):
newone = ScriptAlgorithm(self.descriptionFile)
newone = self
return newone

def icon(self):
Expand Down

0 comments on commit ff32054

Please sign in to comment.