Skip to content
Permalink
Browse files

Fixed bug using multipleinputpanel in modeler

  • Loading branch information
volaya committed Oct 29, 2012
1 parent 83f6712 commit e5437c494b93cfecf6c4f7058a4f3003bc85ba6c
Showing with 13 additions and 12 deletions.
  1. +13 −12 python/plugins/sextante/gui/MultipleInputPanel.py
@@ -35,7 +35,7 @@

class MultipleInputPanel(QtGui.QWidget):

def __init__(self, options, datatype, parent = None):
def __init__(self, options, datatype = None, parent = None):
super(MultipleInputPanel, self).__init__(parent)
self.options = options
self.datatype = datatype
@@ -54,17 +54,18 @@ def __init__(self, options, datatype, parent = None):
self.setLayout(self.horizontalLayout)

def showSelectionDialog(self):
if self.datatype == ParameterMultipleInput.TYPE_RASTER:
options = QGisLayers.getRasterLayers()
elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
options = QGisLayers.getVectorLayers()
else:
options = QGisLayers.getVectorLayers(self.datatype)
opts = []
for opt in options:
opts.append(opt.name())
self.options = opts

#If there is a datatype, we use it to create the list of options
if self.datatype is not None:
if self.datatype == ParameterMultipleInput.TYPE_RASTER:
options = QGisLayers.getRasterLayers()
elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
options = QGisLayers.getVectorLayers()
else:
options = QGisLayers.getVectorLayers(self.datatype)
opts = []
for opt in options:
opts.append(opt.name())
self.options = opts
dlg = MultipleInputDialog(self.options, self.selectedoptions)
dlg.exec_()
if dlg.selectedoptions != None:

0 comments on commit e5437c4

Please sign in to comment.
You can’t perform that action at this time.