Skip to content

Commit

Permalink
More reliable updates to the gdal command shown
Browse files Browse the repository at this point in the history
By also checking for child widget signals - otherwise we don't
catch signals when compound widgets (such as raster layer source
widgets) are changed
  • Loading branch information
nyalldawson committed Aug 13, 2017
1 parent 95fe5cd commit 19e5886
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
Expand Up @@ -39,7 +39,8 @@

from qgis.core import (QgsProcessingFeedback,
QgsProcessingParameterDefinition)
from qgis.gui import QgsMessageBar
from qgis.gui import (QgsMessageBar,
QgsProjectionSelectionWidget)

from processing.gui.AlgorithmDialog import AlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
Expand Down Expand Up @@ -93,10 +94,17 @@ def __init__(self, parent, alg):
def connectParameterSignals(self):
for wrapper in list(self.wrappers.values()):
w = wrapper.widget
self.connectWidgetChangedSignals(w)
for c in w.children():
self.connectWidgetChangedSignals(c)

def connectWidgetChangedSignals(self, w):
if isinstance(w, QLineEdit):
w.textChanged.connect(self.parametersHaveChanged)
elif isinstance(w, QComboBox):
w.currentIndexChanged.connect(self.parametersHaveChanged)
elif isinstance(w, QgsProjectionSelectionWidget):
w.crsChanged.connect(self.parametersHaveChanged)
elif isinstance(w, QCheckBox):
w.stateChanged.connect(self.parametersHaveChanged)
elif isinstance(w, MultipleInputPanel):
Expand Down

0 comments on commit 19e5886

Please sign in to comment.