Skip to content

Commit 943b101

Browse files
committedJan 6, 2016
[processing] added selectionChanged signal to MultipleInputPanel
linked signal with GdalAlgorithmDialog
1 parent 1f22b43 commit 943b101

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
21
from PyQt4.QtGui import *
32
from processing.gui.AlgorithmDialog import AlgorithmDialog
43
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
54
from processing.gui.ParametersPanel import ParametersPanel
5+
from processing.gui.MultipleInputPanel import MultipleInputPanel
66

77

88
class GdalAlgorithmDialog(AlgorithmDialog):
@@ -57,6 +57,8 @@ def connectParameterSignals(self):
5757
w.currentIndexChanged.connect(self.parametersHaveChanged)
5858
elif isinstance(w, QCheckBox):
5959
w.stateChanged.connect(self.parametersHaveChanged)
60+
elif isinstance(w, MultipleInputPanel):
61+
w.selectionChanged.connect(self.parametersHaveChanged)
6062

6163
def parametersHaveChanged(self):
6264
try:

‎python/plugins/processing/gui/MultipleInputPanel.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
***************************************************************************
1818
"""
1919

20+
2021
__author__ = 'Victor Olaya'
2122
__date__ = 'August 2012'
2223
__copyright__ = '(C) 2012, Victor Olaya'
@@ -28,6 +29,7 @@
2829
import os
2930

3031
from PyQt4 import uic
32+
from PyQt4.QtCore import pyqtSignal
3133

3234
from processing.gui.MultipleInputDialog import MultipleInputDialog
3335
from processing.gui.MultipleFileInputDialog import MultipleFileInputDialog
@@ -39,6 +41,8 @@
3941

4042
class MultipleInputPanel(BASE, WIDGET):
4143

44+
selectionChanged = pyqtSignal()
45+
4246
def __init__(self, options=None, datatype=None):
4347
super(MultipleInputPanel, self).__init__(None)
4448
self.setupUi(self)
@@ -68,3 +72,5 @@ def showSelectionDialog(self):
6872
self.selectedoptions = dlg.selectedoptions
6973
self.leText.setText(
7074
self.tr('%d elements selected') % len(self.selectedoptions))
75+
self.selectionChanged.emit()
76+

0 commit comments

Comments
 (0)
Please sign in to comment.