12025 Commits

Author SHA1 Message Date
Alessandro Pasotti
bbf621411a Add method to set line edit alignment in Qgs(Double)SpinBox 2018-02-02 08:12:12 +01:00
Alessandro Pasotti
287f82286b Add QgsRangeFieldFormatter to bindings 2018-02-02 08:10:54 +01:00
Alessandro Pasotti
0eeea76292
Merge pull request #6237 from elpaso/commas-dots-fieldvalidator
[bugfix][attrtable] Convert comma to dot for floating point input
2018-02-01 07:53:23 +01:00
Alexander Bruy
55759a4cee [processing] remove unused icons and use SVG icon for Heatmap algorithm 2018-02-01 07:22:12 +02:00
Alexander Bruy
3ab6e5c399
Merge pull request #6238 from alexbruy/saga-icon
[processing] SVG icon for SAGA provider
2018-02-01 07:18:01 +02:00
nirvn
1ac6792678 add transform context to the map overview 2018-02-01 09:11:45 +07:00
Nyall Dawson
216821c0b1 [processing] Warn on duplicate output and provider registration
And fix associated memory leaks
2018-02-01 13:02:59 +11:00
Nyall Dawson
2218f653ca [processing][grass] Remove duplicate parameter from r.stats 2018-02-01 07:53:54 +11:00
Nyall Dawson
5896fb3305 [processing][grass] Fix incorrect name for i.albedo parameter 2018-02-01 07:53:54 +11:00
Nyall Dawson
fc68bb25d7 [processing] Allow case-different duplicate parameter names
But always prefer case-exact matches for parameter names. Turns
out the grass provider requires use of parameters with the same
name but different case, so we need to be able to handle this.
2018-02-01 07:53:54 +11:00
Alexander Bruy
c3fc560fef [processing] SVG icon for SAGA provider 2018-01-31 16:14:32 +02:00
Alessandro Pasotti
cc1625c83e [bugfix][attrtable] Convert comma to dot for floating point input
This fixes an unreported bug that without detecting an
invalid input when using a comma as a decimal separator
silently converts the entered value to NULL.

Since locale support in QGIS is in its early stages
we convert commas to dots within the validator,
this is common practice in almost all web applications
where you can enter a comma instead of a dot and
the conversion appears while you digit.

This comes with brand new tests for QgsFieldValidator.

Bonus: small fix in sipify.
2018-01-31 12:50:14 +01:00
Harrissou Sant-anna
91a80759bf Fully replace node* by vertex* 2018-01-31 04:51:20 +01:00
Nyall Dawson
67f2649315 Set default snapping tolerance to 15 pixels
Because 0 meter default is bad UX. Also update global_settings
ini with snapping settings.
2018-01-30 18:31:02 +11:00
Mathieu Pellerin
eb42afed9b
add trandform context to QgsBearingUtils::bearingTrueNorth 2018-01-30 13:26:36 +07:00
Nyall Dawson
77e54d3502 [console] Make console action checkable, and bring behaviour into
line with style dock/processing toolbox

Where the action is checked only if the dock is open and user visible,
and checking the action brings hidden tabs to the foreground instead
of closing them.
2018-01-30 14:33:06 +11:00
Nyall Dawson
eba7e7b8b4 Fix QgsRasterFileWriter::driverForExtension and extensionsForFormat
were skipping non-creatable datasets

And indicate in the docs that read-only datasets are also considered
2018-01-30 12:19:28 +11:00
Nyall Dawson
878fb951a8 Simplify and optimise python list->QgsAttributes conversion 2018-01-30 06:15:51 +11:00
Alexander Bruy
c10438e68a [processing] add missed parameter to warp algorithm 2018-01-29 18:48:08 +02:00
Mathieu Pellerin
e0c12d519f
[processing] nodes -> vertices algorithm renaming
- "Extract nodes" renamed to "Extract vertices"
- "Extract specific nodes" renamed to "Extract specific vertices"
2018-01-29 19:16:43 +07:00
Nyall Dawson
da4d937758 Correctly resolve paths for raster image fill symbol layers 2018-01-29 20:51:36 +11:00
Nyall Dawson
ec224117de Expose project QgsPathResolver to render context
So that it can be used when resolving paths to data defined
file-based settings, e.g. svg marker paths.

Fixes #17364
2018-01-29 20:51:36 +11:00
pcav
5b8bea74a6 Merge branch 'master' of github.com:qgis/QGIS 2018-01-29 10:19:13 +01:00
pcav
3b39dcf401 Changed in in DB Manager 2018-01-29 10:18:52 +01:00
Blottiere Paul
aec399e785
Merge pull request #6142 from pblottiere/bugfix_transaction_constraints
Update all attributes in a single transaction
2018-01-29 08:19:16 +00:00
nirvn
51c5805e13 [raster] don't auto-classify upon customizing values tree (fixes #17102) 2018-01-29 14:56:44 +07:00
Blottiere Paul
e24b6bb119 Update sip binding 2018-01-29 07:17:33 +00:00
Blottiere Paul
c1fac42518 Update all attributes in a single transaction
Fixes #17869
2018-01-29 07:17:32 +00:00
Salvatore Larosa
77163ba0ec [processing] fix toggle advanced mode button in batch panel (#6193) 2018-01-29 08:12:30 +01:00
Nyall Dawson
a05d941e4e [processing] Default to allowing background execution of algorithms
Since the underlying issues with the Python bindings are now fixed,
in most cases we can safely default to allowing an algorithm to
run in a background thread!!

So now we make this the default, and require individual algorithms
which are NOT thread safe to declare this. This includes algorithms
which directly manipulate the current project or layers (such as
setting layer styles), alter the selections in layers, or which
rely on 3rd party libraries (for now, SAGA and GRASS algorithms
are marked as not thread safe... TODO - someone more familiar with
these libraries can investigate and remove the flag if appropriate).

Also models are marked as non-thread safe. TODO: only flag an
individual model as thread-unsafe if any of its child algorithms
report this flag.
2018-01-29 17:37:05 +11:00
Nyall Dawson
0f963dfadf [processing] Default to supporting non-file based outputs for providers
And make this support opt-out, since the vast majority of providers
are based on QGIS API and don't have external dependencies which would
restrict use of memory layers/etc.

Plus, I'd rather see non-compliant providers expose this support when
they can't use non-file-based-outputs (and make this the bug which
needs fixing) then have to rely on plugin providers to discover and
explicitly expose this support.
2018-01-29 13:14:06 +10:00
Nyall Dawson
f9a8161733 Fix some leaks and errors in sip conversions 2018-01-29 08:47:25 +11:00
Salvatore Larosa
ebb725ec04 [processing] create widget correctly from wrapper when in batch mode 2018-01-28 22:11:51 +01:00
Salvatore Larosa
550c74e106 [processing] fix wrong getter 2018-01-28 21:31:18 +01:00
Salvatore Larosa
3ca5d72455 apply enableAutoGeometryRestore to config shortcut dialog 2018-01-28 16:43:59 +01:00
Nyall Dawson
bcbc46b56b Fix possible GIL deadlock when iterating features in python
and an exception is thrown
2018-01-28 22:34:16 +11:00
Nyall Dawson
71bdda5f83
Merge pull request #6176 from nyalldawson/gil
[python] Always release the GIL before calling PyQGIS c++ methods
2018-01-27 08:24:17 +11:00
Alexander Bruy
891ca3cd11 [processing] fix wrong variable name 2018-01-26 19:35:40 +02:00
nirvn
6d5dce22f6 [processing] properly size toolbar button for provider actions 2018-01-26 13:11:24 +07:00
Nyall Dawson
b3256ad2c3 [python] Always release the GIL before calling PyQGIS c++ methods
Switches on the sip "-g" switch, which forces sip to release the
Python Global Interpreter Lock before calling a qgis c++ method,
and reacquire it after.

While this flag is not a default sip flag, it is used when building
the PyQt API, so can't forsee any issues from enabling it.

The benefit however is extreme for PyQGIS based scripts which
rely on threads, potentially resulting in massive performance
boosts.

Without this switch, calling an expensive c++ method (say,
building a QgsSpatialIndex using a QgsFeatureIterator) would lock
the Python GIL for the duration of the c++ call... which could
potentially take minutes or more. With the switch, the lock
is released before all calls, so other Python threads are free
to merrily grab the lock and do other processing while the
original thread chugs away in c++ land.

Benchtests of worst-case scenarios (single thread calling
thousands of very inexpensive PyQGIS methods (simple getters))
regressed from mean of 154 seconds to 158 with this flag. But
that's worst case (and as Intel have recently demonstrated...
we can't take yesterday's computing speed as the benchmark
for todays ;). Given that best case scenarious (multi-threaded
operations calling slow c++ methods) will benefit so greatly
from this change, I think it's an acceptable trade off.

*This is a step toward potentially re-enabling background
execution of python based Processing algorithms, and also
should greatly improve QGIS responsiveness when using
python based renderers/symbols.
2018-01-26 14:55:31 +10:00
Salvatore Larosa
f4f89bbcbe [processing] resurrects matrix parameter 2018-01-25 21:54:22 +01:00
Mathieu Pellerin
34c2d32b3e
[processing] add actions when provider is registered / activated 2018-01-25 16:16:44 +07:00
Nyall Dawson
bf19eb6f35 [processing] Non-filed based outputs (e.g. postgis, geopackage)
options should be available for certain model outputs and script
algorithm outputs

We do this by swapping the test for non-file based output support
from checking only the algorithm's provider to instead checking
on a parameter-by-parameter basis.

This is done in order to support models. For models, depending
on what child algorithm a model output is based off, an individual
model may or may not have support for non-file based outputs. E.g
a model may generate outputs from a native qgis alg (supporting
these outputs) AND an output from a GDAL alg (with no support
for these outputs). In this case we need to enable or disable
the ui controls for non-file based outputs on an individual
output basis.

For scripts (for now) we blindly just say all outputs support
non-file based formats. This is going to be the case most of
the time, since scripts will usually be written using PyQGIS
API. For the exceptions (e.g. scripts which call other algs
like GDAL algs) we probably should add some way for the script
to indicate whether an individual output supports this, but
for now we just say they all do.

Fixes #17949
2018-01-25 15:47:42 +11:00
Nyall Dawson
975ef8e899 Show field type in tooltip in attribute table header 2018-01-25 11:35:54 +11:00
Denis Rouzaud
0e7cea2244 QgsGeometryUtils: rename 2 methods
- projPointOnSegment has been renamed to projectPointOnSegment
- getSelfIntersections has been renamed to selfIntersections
2018-01-24 03:38:59 -09:00
nirvn
5f5f1f9c05 [processing] don't modify output filename in build virtual raster 2018-01-24 18:18:32 +07:00
nirvn
746701bf33 [processing] add default extension to empty filter when available 2018-01-24 18:18:32 +07:00
Nyall Dawson
097a437af8 [processing] Fix missing outputs in modeler for grass algs (fixes #17703) 2018-01-24 19:00:58 +11:00
Nyall Dawson
4e6aa3c359 [processing] Fix error on win when grass path isn't set correctly 2018-01-24 19:00:58 +11:00
Nyall Dawson
2013725793 Fix gui handling of NULL/None default values in processing script algorithms 2018-01-24 17:54:47 +11:00