diff --git a/python/plugins/processing/algs/grass7/Grass7Algorithm.py b/python/plugins/processing/algs/grass7/Grass7Algorithm.py index 0daef3998b8..65e4c2c68f2 100644 --- a/python/plugins/processing/algs/grass7/Grass7Algorithm.py +++ b/python/plugins/processing/algs/grass7/Grass7Algorithm.py @@ -97,8 +97,7 @@ class Grass7Algorithm(GeoAlgorithm): self.module = None def getCopy(self): - newone = Grass7Algorithm(self.descriptionFile) - return newone + return self def name(self): return self._name diff --git a/python/plugins/processing/algs/r/RAlgorithm.py b/python/plugins/processing/algs/r/RAlgorithm.py index aef72189988..df3aa467cf1 100644 --- a/python/plugins/processing/algs/r/RAlgorithm.py +++ b/python/plugins/processing/algs/r/RAlgorithm.py @@ -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) diff --git a/python/plugins/processing/algs/saga/SagaAlgorithm.py b/python/plugins/processing/algs/saga/SagaAlgorithm.py index f137ff22384..fde7839a6e7 100644 --- a/python/plugins/processing/algs/saga/SagaAlgorithm.py +++ b/python/plugins/processing/algs/saga/SagaAlgorithm.py @@ -78,8 +78,7 @@ class SagaAlgorithm(GeoAlgorithm): self._group = '' def getCopy(self): - newone = SagaAlgorithm(self.descriptionFile) - return newone + return self def icon(self): if self._icon is None: diff --git a/python/plugins/processing/core/Processing.py b/python/plugins/processing/core/Processing.py index 1a6a7029e87..fc575fa509b 100644 --- a/python/plugins/processing/core/Processing.py +++ b/python/plugins/processing/core/Processing.py @@ -139,7 +139,6 @@ class Processing(object): for script in scripts: script.allowEdit = False script._icon = provider._icon - script.provider = provider provider.externalAlgs.extend(scripts) provider.refreshAlgorithms() diff --git a/python/plugins/processing/modeler/ModelerAlgorithm.py b/python/plugins/processing/modeler/ModelerAlgorithm.py index fbd088fb61a..cfc1c1c5b9b 100644 --- a/python/plugins/processing/modeler/ModelerAlgorithm.py +++ b/python/plugins/processing/modeler/ModelerAlgorithm.py @@ -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(): diff --git a/python/plugins/processing/modeler/ModelerDialog.py b/python/plugins/processing/modeler/ModelerDialog.py index 9b047c0c7a4..9f053171ee3 100644 --- a/python/plugins/processing/modeler/ModelerDialog.py +++ b/python/plugins/processing/modeler/ModelerDialog.py @@ -632,7 +632,6 @@ class ModelerDialog(BASE, WIDGET): 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()) diff --git a/python/plugins/processing/preconfigured/PreconfiguredAlgorithm.py b/python/plugins/processing/preconfigured/PreconfiguredAlgorithm.py index 1dc2b1be24b..b5c87b164cf 100644 --- a/python/plugins/processing/preconfigured/PreconfiguredAlgorithm.py +++ b/python/plugins/processing/preconfigured/PreconfiguredAlgorithm.py @@ -56,7 +56,7 @@ class PreconfiguredAlgorithm(GeoAlgorithm): return QgsProcessingAlgorithm.FlagHideFromModeler def getCopy(self): - newone = PreconfiguredAlgorithm(self.descriptionFile) + newone = self newone.outputs = [] newone._name = self._name newone._group = self._group diff --git a/python/plugins/processing/script/ScriptAlgorithm.py b/python/plugins/processing/script/ScriptAlgorithm.py index 526ced231e5..d50507bc4d6 100644 --- a/python/plugins/processing/script/ScriptAlgorithm.py +++ b/python/plugins/processing/script/ScriptAlgorithm.py @@ -72,7 +72,7 @@ class ScriptAlgorithm(GeoAlgorithm): self.defineCharacteristicsFromFile() def getCopy(self): - newone = ScriptAlgorithm(self.descriptionFile) + newone = self return newone def icon(self):