9
9
(C) 2013 by CS Systemes d'information (CS SI)
10
10
Email : volayaf at gmail dot com
11
11
otb at c-s dot fr (CS SI)
12
- Contributors : Victor Olaya
12
+ Contributors : Victor Olaya
13
13
Alexia Mondot (CS SI) - managing the new parameter ParameterMultipleExternalInput
14
14
***************************************************************************
15
15
* *
@@ -169,9 +169,9 @@ def setParamValues(self):
169
169
def setParamValue (self , param , widget ):
170
170
"""
171
171
set the .value of the parameter according to the given widget
172
- the way to get the value is different for each value,
172
+ the way to get the value is different for each value,
173
173
so there is a code for each kind of parameter
174
-
174
+
175
175
param : -il <ParameterMultipleInput> or -method <ParameterSelection> ...
176
176
"""
177
177
if isinstance (param , ParameterRaster ):
@@ -191,7 +191,7 @@ def setParamValue(self, param, widget):
191
191
return param .setValue (widget .getValue ())
192
192
if isinstance (param , ParameterTableField ):
193
193
if param .optional and widget .currentIndex () == 0 :
194
- return param .setValue (None )
194
+ return param .setValue (None )
195
195
return param .setValue (widget .currentText ())
196
196
elif isinstance (param , ParameterMultipleInput ):
197
197
if param .datatype == ParameterMultipleInput .TYPE_VECTOR_ANY :
@@ -260,10 +260,7 @@ def accept(self):
260
260
self .finish ()
261
261
else :
262
262
QApplication .restoreOverrideCursor ()
263
- if not keepOpen :
264
- self .close ()
265
- else :
266
- self .resetGUI ()
263
+ self .resetGUI ()
267
264
else :
268
265
command = self .alg .getAsCommand ()
269
266
if command :
@@ -273,10 +270,7 @@ def accept(self):
273
270
self .finish ()
274
271
else :
275
272
QApplication .restoreOverrideCursor ()
276
- if not keepOpen :
277
- self .close ()
278
- else :
279
- self .resetGUI ()
273
+ self .resetGUI ()
280
274
except AlgorithmExecutionDialog .InvalidParameterValue , ex :
281
275
try :
282
276
self .buttonBox .accepted .connect (lambda :
@@ -309,15 +303,9 @@ def finish(self):
309
303
310
304
def error (self , msg ):
311
305
QApplication .restoreOverrideCursor ()
312
- keepOpen = ProcessingConfig .getSetting (
313
- ProcessingConfig .KEEP_DIALOG_OPEN )
314
306
self .setInfo (msg , True )
315
- if not keepOpen :
316
- QMessageBox .critical (self , 'Error' , msg )
317
- self .close ()
318
- else :
319
- self .resetGUI ()
320
- self .tabWidget .setCurrentIndex (1 ) # log tab
307
+ self .resetGUI ()
308
+ self .tabWidget .setCurrentIndex (1 ) # log tab
321
309
322
310
def iterate (self , i ):
323
311
self .setInfo ('<b>Algorithm %s iteration #%i completed</b>'
0 commit comments