File tree 1 file changed +4
-2
lines changed
python/plugins/sextante/modeler
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -204,9 +204,10 @@ def setupUi(self):
204
204
self .fileFolderCombo = QtGui .QComboBox ()
205
205
self .fileFolderCombo .addItem ("File" )
206
206
self .fileFolderCombo .addItem ("Folder" )
207
- self .horizontalLayout2 .addWidget (self .fileFolderCombo )
208
207
if self .param is not None :
209
208
self .fileFolderCombo .setCurrentIndex (1 if self .param .isFolder else 0 )
209
+ self .horizontalLayout2 .addWidget (self .fileFolderCombo )
210
+ self .verticalLayout .addLayout (self .horizontalLayout2 )
210
211
211
212
self .buttonBox = QtGui .QDialogButtonBox (self )
212
213
self .buttonBox .setOrientation (QtCore .Qt .Horizontal )
@@ -268,7 +269,8 @@ def okPressed(self):
268
269
elif self .paramType == ModelerParameterDefinitionDialog .PARAMETER_EXTENT or isinstance (self .param , ParameterExtent ):
269
270
self .param = ParameterExtent (name , description )
270
271
elif self .paramType == ModelerParameterDefinitionDialog .PARAMETER_FILE or isinstance (self .param , ParameterFile ):
271
- self .param = ParameterFile (name , description )
272
+ isFolder = self .fileFolderCombo .currentIndex () == 1
273
+ self .param = ParameterFile (name , description , isFolder = isFolder )
272
274
self .close ()
273
275
274
276
def cancelPressed (self ):
You can’t perform that action at this time.
0 commit comments