Bug report #15703
Cannot run batch processing with only 1 row of parameters
|Affected QGIS version:||2.16.3||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23626|
When the Batch Processing window first opens, there are three empty rows of parameters. Clicking on the "red minus" icon will remove a row, but it does not work if there are only two rows.To reproduce the bug:
- Open the "Merge vector layers" tool
- Click the "Run as batch process..." button
- Try to delete the rows so that only one is left (nothing happens once you are down to 2 rows)
Why would we need to use batch processing for a single operation?
Great question! Here's one example: Now that ftools has been removed, the recommended way of merging a whole directory of shapefiles is to use the batch processing interface, as recommended in #15321 However, if you only need to merge a single directory, there is no way to remove the extra row in the batch interface, and clicking "Run" results in an error: "Missing parameter value: Layers to merge (row 2)"
Fixing this requires just a very trivial change of a single character in this line:
#1 Updated by Victor Olaya almost 5 years ago
It shouldnt make sense to run a single line. If there is something you want to do with a single line, you can do it with the normal interface
In the case you mention, is true that you cannot do that from the normal dialog, since for multiple inputs, you must select them from open file. That should be corrected there, we should make that input more flexible.
However, that is a bigger change, so i will allow running a single algorithm from batch processing, since the change you propose is harmless
Thanks for the proposal!