5327 Commits

Author SHA1 Message Date
Nyall Dawson
52585cf226 Fix memory provider handling of missing attributes when adding features
Ensure that features added to a memory provider (and returned when
fetching features from a memory provider) always have the correct
number of attributes present.

Fixes many random behavior bugs when working with memory providers.
2018-02-16 22:36:23 +11:00
Nyall Dawson
6d3b37a85e Add provider test to ensure that features added with missing attributes
are transparently padded out with NULL attributes to the required fields
length

Currently the behavior is inconsistent - some providers reject these
features, others pad them out, and worse -- some add them with
missing attributes (memory provider), causing ALL sorts of flow-on,
difficult to debug issues.
2018-02-16 22:36:23 +11:00
Blottiere Paul
cd4d9d0b0d Drop z dimension in case of circle from tangential points 2018-02-16 10:06:42 +00:00
Blottiere Paul
12392f75b3 Some clean 2018-02-16 10:06:42 +00:00
Blottiere Paul
ce9e012be8 Add some tests for regular polygon map tools 2018-02-16 10:06:42 +00:00
Blottiere Paul
d7860e25b0 Add some tests for ellipse map tools 2018-02-16 10:06:42 +00:00
Blottiere Paul
868c869e88 Add some tests for ellipse map tools 2018-02-16 10:06:42 +00:00
Blottiere Paul
58610b4298 Add some tests for circle map tools 2018-02-16 10:06:42 +00:00
Blottiere Paul
916e4bae2e Add some tests for circular string map tools 2018-02-16 10:06:42 +00:00
Blottiere Paul
d2ed783de2 Add test for z values on QgsMapToolAddFeature with LineStringZ 2018-02-16 10:06:42 +00:00
Alessandro Pasotti
0310c1d253
Merge pull request #6354 from elpaso/NathanW2-settings_17670
Nathan w2 settings 17670
2018-02-16 09:57:58 +01:00
Nyall Dawson
14787ffb32 [processing] Add easy method to retrieve layers from context
Allows python algorithms to call

layer = context.getMapLayer(other_alg_results['OUTPUT'] )
2018-02-16 19:49:30 +11: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
Nyall Dawson
d380c61096
Merge pull request #6353 from nyalldawson/proc_normalize
[processing] Don't replace " with ' when handling layer paths
2018-02-16 12:33:50 +11:00
Alessandro Pasotti
e4407c6bb4 Remove debug output from stdout 2018-02-15 14:39:21 +01:00
Marco Hugentobler
fa815f023f Fix warning 2018-02-15 11:17:35 +01:00
Nyall Dawson
5c40975fe7 [processing] Don't replace " with ' when handling layer paths
Since netcdf, and possibly other gdal drivers, use layer uris
of the format NETCDF:"/tmp/test.nc":var1 we can't safely
remove or reformat these quotations.
2018-02-15 16:43:21 +10:00
Mathieu Pellerin
543e4f0dd1
[attribute table] fix long UI freeze when resizing columns for large filtered datasets (#6341) 2018-02-14 21:25:43 +07:00
Marco Hugentobler
256e4419b2 Escape blanks in MTEXT and add unit test 2018-02-13 15:50:42 +01:00
mhugent
bf4ba08a40
Merge pull request #6331 from mhugent/dxf_label_layers_v3
Fix dxf export for label layers and add unit test
2018-02-13 10:46:54 +01:00
Nyall Dawson
70644f1ddd Fix undo stack does not correctly roll back geometry edits
in a granular manner

Fixes #17658
2018-02-13 19:48:43 +11:00
mhugent
c996c61789
Merge branch 'master' into dxf_label_layers_v3 2018-02-13 09:23:05 +01:00
Marco Hugentobler
5c3a7554de Fix dxf export for label layers and add unit test 2018-02-13 08:55:26 +01:00
Denis Rouzaud
31e93aecae [dxf] use a struct instead of QPair for layers
there was a crash in Python in QgsDxfExport.addLayers due to a bad conversion
2018-02-12 09:22:21 -04: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
rldhont
a9d61ff508
Merge pull request #6285 from tudorbarascu/dpi
fix server issue for double devicePixelRatio leading to DPI requests with decimals
2018-02-12 11:26:18 +01:00
Tudor Bărăscu
fbc6e4d11d add Server DPI test 2018-02-12 10:45:03 +02:00
Nyall Dawson
5431a2dbae Fix crash when repairing zero length linestring geometry
Fixes #18077
2018-02-12 13:43:14 +11:00
Nyall Dawson
9dca6da060 Don't silently discard requests to set QgsFieldExpressionWidget
to an empty expression

This causes issues in lots of places - e.g. a field constraint
is always set to the first field in a layer, and cannot be
removed.

I've looked at all calls to setField and without exception
they should accept that setting the field to an empty string
results in an empty expression.

Fixes #14325
2018-02-12 11:18:31 +10:00
Denis Rouzaud
bfe35c26ea [postgres] use pg_type rather than information_schema.domain_constraints to retrieve domain
otherwise there is no warranty to retrieve the correct constraint as its name is not unique
2018-02-11 17:29:18 -04:00
Denis Rouzaud
781b587090 add test for postgres domains 2018-02-10 15:27:06 -04:00
nirvn
715677ee5d move getValues, getDoubleValues to vector layer utils source file 2018-02-07 13:27:39 +07:00
Denis Rouzaud
3205c96af6
Merge pull request #6275 from 3nids/messagelevel
unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
2018-02-06 05:28:17 -09:00
Denis Rouzaud
3dc3d9d1b2 unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Nyall Dawson
3e1b99be69 Remove a bunch of Qt4 compatibility code 2018-02-06 22:39:42 +11:00
lbartoletti
124e26815d Standardize shebangs (was Usr bin env) (#6229)
* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* Linux perl; missing from last PR

* fix doxygen_space

* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* fix doxygen_space
2018-02-05 03:38:02 -09:00
Alessandro Pasotti
7bf0a7f714
Merge pull request #6251 from elpaso/bugfix-17975-server-layer-groups-order
[bugfix][server] WMS respect order of grouped layers
2018-02-05 09:24:37 +01:00
Nyall Dawson
4287ce489d [layouts] Fix rotated items move when refreshing layout
Fixes #18037
2018-02-05 13:45:14 +11:00
Nyall Dawson
345dd0c376 [layouts] Fix items disappear in designer with 90 or 270 degree
rotation

Caused by Qt bug 66185

Fixes #18027
2018-02-05 12:36:18 +11:00
Mathieu Pellerin
a66a4dbd83
use a QMimeData clipboard object to paste features as HTML table (#6243) 2018-02-03 10:54:07 +07:00
Alessandro Pasotti
5c5ef3b6de
Merge pull request #6246 from elpaso/rangeformatter
[bugfix] Range formatter for doubles and ints
2018-02-02 14:25:28 +01:00
Alessandro Pasotti
31de32420d Tests for range field formatter 2018-02-02 12:51:49 +01:00
Alessandro Pasotti
50d378fa81 Update tests for WMS grouped layers order 2018-02-02 11:07:51 +01:00
Nyall Dawson
252dbdcc48 Fix clazy unnecessary unnecessary container allocation warnings 2018-02-02 19:52:01 +11:00
Nyall Dawson
b2b500d5b2 Fix clazy QFileInfo::exists warnings 2018-02-02 19:52:01 +11:00
Nyall Dawson
16e98f205a Default to a dark gray instead of black for symbol outlines
Avoiding the very high constrast pure black results in cartographically
more pleasing styles, so it's nice to do this by default.

This should result in nicer looking maps being created in QGIS
when users don't do any manual style tweaks.
2018-02-02 15:59:13 +10: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
Alessandro Pasotti
f3f0eb0035
Merge pull request #6236 from elpaso/double-linedit-default-widget
[bugfix] Lower priority of range widget for doubles
2018-02-01 07:53:04 +01:00
Nyall Dawson
247ea02ae7 Update tests 2018-02-01 13:02:59 +11:00
Nyall Dawson
6c5276cea5 Fix test 2018-02-01 13:02:59 +11:00