Skip to content

Commit

Permalink
Move getParametersPanel out of algorithm class
Browse files Browse the repository at this point in the history
It's a gui related method, so shouldn't be in core class
  • Loading branch information
nyalldawson committed Jun 5, 2017
1 parent 168f162 commit 134c04b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions python/plugins/processing/core/GeoAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

from builtins import str
from builtins import object
from processing.gui.ParametersPanel import ParametersPanel
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
Expand Down Expand Up @@ -90,9 +89,6 @@ def defineCharacteristics(self):
"""
pass

def getParametersPanel(self, parent):
return ParametersPanel(parent, self)

def getCustomModelerParametersDialog(self, modelAlg, algName=None):
"""If the algorithm has a custom parameters dialog when called
from the modeler, it should be returned here, ready to be
Expand Down
6 changes: 5 additions & 1 deletion python/plugins/processing/gui/AlgorithmDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig

from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.BatchAlgorithmDialog import BatchAlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.AlgorithmExecutor import execute, executeIterating
Expand All @@ -62,7 +63,7 @@ def __init__(self, alg):

self.alg = alg

self.setMainWidget(alg.getParametersPanel(self))
self.setMainWidget(self.getParametersPanel(alg, self))

self.bar = QgsMessageBar()
self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
Expand All @@ -78,6 +79,9 @@ def __init__(self, alg):
self.cornerWidget.setLayout(layout)
self.tabWidget.setCornerWidget(self.cornerWidget)

def getParametersPanel(self, alg, parent):
return ParametersPanel(parent, alg)

def runAsBatch(self):
self.close()
dlg = BatchAlgorithmDialog(self.alg)
Expand Down

0 comments on commit 134c04b

Please sign in to comment.