Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] fixed update of console call in GdalAlgorithmDialog
fixes #14129
  • Loading branch information
volaya committed Jan 19, 2016
1 parent d91f0cd commit b2a1273
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
Expand Up @@ -31,6 +31,7 @@
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.ParametersPanel import ParametersPanel
from processing.gui.MultipleInputPanel import MultipleInputPanel
from processing.gui.NumberInputPanel import NumberInputPanel


class GdalAlgorithmDialog(AlgorithmDialog):
Expand Down Expand Up @@ -90,6 +91,8 @@ def connectParameterSignals(self):
w.stateChanged.connect(self.parametersHaveChanged)
elif isinstance(w, MultipleInputPanel):
w.selectionChanged.connect(self.parametersHaveChanged)
elif isinstance(w, NumberInputPanel):
w.hasChanged.connect(self.parametersHaveChanged)

def parametersHaveChanged(self):
try:
Expand Down
7 changes: 7 additions & 0 deletions python/plugins/processing/gui/NumberInputPanel.py
Expand Up @@ -28,6 +28,7 @@
import os

from PyQt4 import uic
from PyQt4.QtCore import pyqtSignal

from math import log10, floor
from processing.gui.NumberInputDialog import NumberInputDialog
Expand All @@ -39,6 +40,8 @@

class NumberInputPanel(BASE, WIDGET):

hasChanged = pyqtSignal()

def __init__(self, number, minimum, maximum, isInteger):
super(NumberInputPanel, self).__init__(None)
self.setupUi(self)
Expand Down Expand Up @@ -73,6 +76,8 @@ def __init__(self, number, minimum, maximum, isInteger):

self.btnCalc.clicked.connect(self.showNumberInputDialog)

self.spnValue.valueChanged.connect(lambda: self.hasChanged.emit())

def showNumberInputDialog(self):
dlg = NumberInputDialog(self.isInteger)
dlg.exec_()
Expand All @@ -90,3 +95,5 @@ def calculateStep(self, minimum, maximum):
return round(step, -int(floor(log10(step))))
else:
return 1.0


0 comments on commit b2a1273

Please sign in to comment.