4198 Commits

Author SHA1 Message Date
Nyall Dawson
62cd1edbb3 [processing] Pressing enter in search box executes the selected algorithm 2018-02-23 08:27:40 +10:00
Nyall Dawson
82bfc407b8 [processing] When searching in toolbox, automatically select
the first visible algorithm if the previously selected item
was hidden

Avoids hidden selections in the toolbox
2018-02-23 08:26:47 +10:00
Nyall Dawson
6b2d3eea03 String fix 2018-02-22 10:04:44 +10:00
Juergen E. Fischer
9a3bfa01c2 fix translation strings 2018-02-22 00:37:48 +01:00
Nyall Dawson
0481666b77
Merge pull request #6408 from arnaud-morvan/processing_reload_fix
Processing reload fixes
2018-02-22 10:03:51 +11:00
arnaud.morvan@camptocamp.com
5af792c1f8 [processing] Call toolbox.deleteLater to avoid slot calls after unload 2018-02-21 21:45:27 +00:00
arnaud.morvan@camptocamp.com
3718d4e65b [processing] Properly load basic providers
Processing module should only register it's own basic providers.
Note that when reloading a plugin, subclasses of ProcessingProvider remains and new ones are added,
so in such cases QgsProcessingProvider.__subclasses__() return same provider class many times.
2018-02-21 21:42:43 +00:00
arnaud.morvan@camptocamp.com
d3a4a34515 [processing] Fix slot prototype in ModelerAlgorithmProvider. Fix #18162 2018-02-21 21:42:21 +00:00
Nyall Dawson
835cca7cae [processing] More string HIG fixes 2018-02-22 06:44:17 +11:00
Nyall Dawson
bd99f6979b More dialog title HIG fixes 2018-02-22 06:44:17 +11:00
Nyall Dawson
146d408190 [processing] Add direct action to open an existing model in editor 2018-02-22 06:44:17 +11:00
Nyall Dawson
277e06ec28 [processing] Fix some message box titles 2018-02-22 06:44:17 +11:00
Felis Pimeja
76c21ea369 Updated and vectorized several icons (#6382) 2018-02-21 15:39:25 +07:00
nirvn
6573eb30e7 [processing] small fix in the MultipleLayerWidgetWrapper wrapper 2018-02-21 12:00:32 +07:00
Nyall Dawson
585a4d3782 [processing] Split multiparts and explode are feature based algorithms 2018-02-21 09:16:43 +11:00
Nyall Dawson
43cd62b62f [processing] Tweak api for QgsProcessingFeatureBasedAlgorithm
Instead of returning a single QgsFeature from processFeature, we now
return a list of features.

This allows feature based algorithms which return multiple features
per input feature, e.g. "explode" type algorithms which split a
single input feature into multiple output features.
2018-02-21 09:16:43 +11:00
Nyall Dawson
206f22b9c7 [processing] Fix algorithm help link in modeler
Fixes #18147
2018-02-20 10:03:27 +11:00
Nyall Dawson
fdebddd13a [processing] Fix raster layers shown as inputs for certain vector algs
Fixes #18148, #18149
2018-02-20 10:03:27 +11:00
Nyall Dawson
c07f37a5cb [processing] Select by expression/attribute can run on geometryless layers 2018-02-20 10:03:27 +11:00
Juergen E. Fischer
2c53630747 add missing copyright headers 2018-02-18 20:53:40 +01:00
Juergen E. Fischer
dcfe5ca63f update translation strings 2018-02-18 17:35:34 +01:00
Salvatore Larosa
a8a449f8c1 [processing] fix variable name 2018-02-17 16:50:43 +01:00
nirvn
3836cd32f0 followup 6dfedc3, fix processing tests 2018-02-16 10:33:53 +07:00
Nyall Dawson
a6a36acc14
Merge pull request #6316 from nyalldawson/locator_thread
Make QgsLocator more thread safe
2018-02-16 12:36:09 +11:00
Juergen E. Fischer
b6111d296e fix 6dfedc38 2018-02-16 01:34:58 +01:00
Juergen E. Fischer
6dfedc38e9 translation string fixes and cleanups 2018-02-15 22:31:15 +01:00
nirvn
4aef3b719f [processing] fix python error with OSM vector layers 2018-02-15 15:56:53 +07:00
Nyall Dawson
46dc2f6e5b [processing] Avoid losing static, user-entered parameter values
in model child algorithms

Prior to this change if you edited an algorithm in a model and
tried to enter a preset string for certain parameter types, this
string would get silently discarded on closing the dialog. E.g.
with a dissolve algorithm it was not possible to have a fixed
field name within the model to dissolve by.

This was caused by WidgetWrapper.comboValue  returning the customData
for these manually entered values in the parameters combo box,
yet manually entered values never have custom data.

To work around this we only return the custom data if its
set for the selected item - otherwise we return the text unchanged.
In order to handle the "[not set]" options, a new static custom
data value of WidgetWrapper.NOT_SET_OPTION is added to that
comboValue can detect this and return the appropriate None value.
2018-02-15 17:45:19 +11:00
Nyall Dawson
12fcfac0d5 [processing] Ensure algorithms which add attributes to features
always add a consistent amount of attributes regardless of the
code paths taken

Some algorithms were adding features to data providers with
different number of attributes vs the layer's fields - this is
not supported and depending on the data provider will have
different (bad) results.
2018-02-15 17:45:00 +11:00
Nyall Dawson
a8110369a8 [processing] Don't throw an exception if an expression cannot
be prepared

There's cases where this happens without reflecting an invalid
expression. So we can try to prepare, but not abort if the
preparation fails.

Fixes #18103
2018-02-15 15:43:26 +11:00
nirvn
8697c79993 [needs-docs][ui] harmonize title of panels 2018-02-15 11:43:19 +07:00
Nyall Dawson
2defaff796 [processing] Much faster random points in polygon by using
prepared geometries
2018-02-15 09:14:01 +11:00
Nyall Dawson
81aa2f956e [processing] Misc fixes and improvements to Random Points in Polygons
- Fix missing format call for string when calculated number
of points is 0
- Fix incorrect progress reports which were spamming the dialog
and causing UI hangs, and slow algorithm execution
2018-02-15 09:14:01 +11:00
Nyall Dawson
e0cf578096 [processing] Add some missing sources to expression contexts 2018-02-15 09:14:01 +11:00
Nyall Dawson
8154a85f29 Fix Python exception in Random Points in Polygon alg
Fixes #18103
2018-02-15 09:14:01 +11:00
Alexander Bruy
b664f12ed6
Merge pull request #6340 from nyalldawson/batch_layer_name
[processing] In batch dialog, use layer names for input layers
2018-02-14 11:06:36 +02:00
Nyall Dawson
8ceb6fc007 [processing] In batch dialog, use layer names for input layers
if they are unique in the current project

Instead of always using the layer id, which is generally
gibberish and meaningless for users, instead prefer to use
the layer name as an input in the batch processing dialog. This
is done only if the name is unique within the current project's
loaded layers.

This change makes the dialog more user-friendly, but more importantly
it means that autofilling output values based on an input layer
parameter generates more meaningful automatic output file names.
2018-02-14 16:46:26 +10:00
nirvn
2d24bbf819 [needs-docs][processing] update raster calculator help to reflect updated logic 2018-02-14 07:43:05 +07:00
Salvatore Larosa
abeef2573c macOS: fix shortcut even for processing tool button 2018-02-13 16:51:04 +01:00
Nyall Dawson
66b9b435b6 [processing] Fix destination files are silently ignored when relaunching
algorithms from the history panel
2018-02-13 14:24:48 +10:00
nirvn
1994c44644 [processing] harmonize results viewer action behavior 2018-02-13 10:40:17 +07:00
nirvn
4ada4989e5 [processing] automatically open results viewer panel when items added 2018-02-12 18:09:38 +07:00
nirvn
207a94738d [processing] offer hyperlink to file path in the results viewer
because users don't always get that there is a dbl-click action
against the tree view items.
2018-02-12 18:09:38 +07:00
Nyall Dawson
7609ab7c9d Allow certain locator filters to operate on the main thread
Some filters are fast enough to return results that it's overkill
to run them in a background thread - add a flag to these filters
to allow them to run (blocking) in the main thread instead.
2018-02-12 20:28:32 +10:00
Nyall Dawson
d5e649292d Fix error when running gdal algorithms through locator 2018-02-12 20:28:32 +10:00
Nyall Dawson
981afb3da1 Make QgsLocator more thread safe
- add a clone() method to filters, and always search using the
clone instead of the original filter
- add a prepare() method to filters, which is always run in the
main thread and can be used to prepare the filter for safe
background execution (e.g. creating feature iterators in advance)
- don't use QtConcurrent to perform searches in background threads,
since it is not safe to use with QObjects
- instead manually create threads and ensure that cloned objects
are always moved to the thread that they will run in, to ensure
that they correctly have thread affinity with the thread in which
they are executed
2018-02-12 20:26:26 +10:00
nirvn
e5d7733bfc [processing] harmonize order of result panel (latest first) and add timestamp 2018-02-12 13:51:31 +07:00
Alexander Bruy
178509347a [processing] add enums support for fields and feature source parameters
(follow up 068d74d5)
2018-02-11 14:05:09 +02:00
Nyall Dawson
414c3a4bfe Fix unavailable layer inputs for multi-layer inputs set to any map layer type 2018-02-11 11:00:49 +10:00
Nyall Dawson
54a99c27a3 [processing] Add multi layer outputs to Package Layers and Vector Split algorithms 2018-02-11 11:00:33 +10:00