35499 Commits

Author SHA1 Message Date
Alexander Bruy
2497375ee9 [FEATURE] save and restore color ramp used for singleband pseudocolor rendering 2016-11-02 14:44:20 +02:00
Alexander Bruy
1c44d7471f Merge pull request #3695 from nirvn/processing_modeler_dblclick
[processing] resurrect editing of modeler item on double-click
2016-11-02 14:16:27 +02:00
Even Rouault
06dc501139 test_provider_ogr_gpkg.py: Test disabling walForSqlite3 setting 2016-11-02 12:40:20 +01:00
Denis Rouzaud
dbd7de3940 Merge pull request #3689 from rduivenvoorde/getPlugins3
Temporarily hardcode plugins version in url ?qgis=3.0
2016-11-02 11:47:04 +01:00
Harrissou Sant-anna
a7ffecd878 Make collapsible the "Curve segmentation" frame
in Settings --> Options --> Rendering dialog (for coherence with other frames)

also fix a typo
2016-11-02 11:22:48 +01:00
Nyall Dawson
4f5337fce5 Merge pull request #3704 from pvalsecc/fix_collapsing
Fix saving of the collapsed state for relations
2016-11-02 18:09:42 +10:00
Alexander Bruy
5d877fd888 Merge pull request #3707 from nyalldawson/multipart_to_single
[processing] optimise multipart to singlepart algorithm
2016-11-02 10:06:25 +02:00
Patrick Valsecchi
28457ed49c Fix saving of the collapsed state for relations
In the attribute form, the collapsed state of RelationReference
was not loaded correctly and was interfering with the collapsed
state of the relation editor.

Plus, the state was saved globally for a reference. Meaning that
if a reference was used (through other references) from other
layers, it was sharing the same state.
2016-11-02 07:21:17 +01:00
Nyall Dawson
18fc0c6fad [processing] optimise multipart to singlepart algorithm
- simplify code
- keep z/m/curved geometries intact
- might be a bit faster
2016-11-02 16:06:00 +10:00
Nyall Dawson
f65e770242 [FEATURE[processing] New algorithm to compute geometry by expression
This algorithm updates existing geometries (or creates new
geometries) for input features by use of a QGIS expression. This
allows complex geometry modifications which can utilise all the
flexibility of the QGIS expression engine to manipulate and create
geometries for output features.
2016-11-02 16:05:46 +10:00
Nyall Dawson
9b9a002be5 Update api break docs 2016-11-02 14:46:24 +10:00
Nyall Dawson
3f2a7810cf Respect non-enforced constraints when editing/adding features
Warnings are shown, but features can be committed. Fields which
fail an unenforced constraint are now shaded in yellow to differentiate
from the red failure for enforced constraints.
2016-11-02 13:42:22 +10:00
Nyall Dawson
fac5bc0691 [FEATURE] Field constraints can be enforced or not
Non-enforced constraints just show a warning to the user, but
do not prevent committing the feature. Enforced constraints
block users from comitting non compliant features.

Any constraints detected by the provider are always
enforced.
2016-11-02 13:42:22 +10:00
Nyall Dawson
e3a608365f fix test 2016-11-02 13:42:22 +10:00
Nyall Dawson
3a59674901 Fix some untranslatable strings 2016-11-02 11:07:07 +10:00
Nyall Dawson
cb94b68d88 Move constraint handling to QgsFieldConstraints
Avoids cluttering QgsField API
2016-11-02 11:07:07 +10:00
Nyall Dawson
003fe1830c Color a few pixels slightly differently 2016-11-02 11:07:07 +10:00
Nyall Dawson
bb6fc32eec [FEATURE] Not null constraint detection for ogr provider
Implements not null constraint detection for the OGR layers, where
supported for the data format by OGR.

(only available for GDAL >= 2.0)
2016-11-02 11:07:07 +10:00
Nyall Dawson
210c98bedc Fix failing unit test 2016-11-02 11:07:07 +10:00
Nyall Dawson
961b63f292 Update API break docs 2016-11-02 11:07:07 +10:00
Nyall Dawson
a6319a47d7 If the layer is NOT being edited then only check layer based constraints
and not any constraints enforced by the provider

Because:

1. we want to keep browsing features nice and responsive. It's nice to give
 feedback as to whether the value checks out, but not if it's too slow to
 do so. Some constraints (eg unique) can be expensive to test. A user can
 freely remove a layer-based constraint if it proves to be too slow to
 test, but they are unlikely to have any control over provider-side
 constraints

2. the provider has already accepted the value, so presumably it doesn't
 violate the constraint and there's no point rechecking!
2016-11-02 11:07:07 +10:00
Nyall Dawson
c98d380dc1 Move responsibility for testing for attribute against constraints
to QgsVectorLayerUtils::validateAttribute()

Also clean up some strings shown to the user when a constraint
check fails
2016-11-02 11:07:07 +10:00
Nyall Dawson
2500d75f5e Move responsibility for storage of constraint expressions to QgsVectorLayer 2016-11-02 11:07:07 +10:00
Nyall Dawson
f99ea26bdf Refactor constraint handling
- store constraint origin in QgsField
- move handling of constraint expressions to QgsField
2016-11-02 11:07:07 +10:00
Nyall Dawson
1cecf37b40 Enforce unique constraints in attribute form 2016-11-02 11:07:07 +10:00
Nyall Dawson
b7d0fd6f90 New class QgsVectorLayerUtils
Contains static helper methods for working with vector layers.
Initially only contains a method to test whether a value
exists within a layer's attributes.
2016-11-02 11:07:07 +10:00
Nyall Dawson
3e40f803c3 Implement constraint detection for spatialite provider 2016-11-02 11:07:07 +10:00
Nyall Dawson
21f885aa7a Select all text after reset line edit to null 2016-11-02 11:07:07 +10:00
Nyall Dawson
6bbd0061f3 Move handling of not null constraint from edit form to layer 2016-11-02 11:07:07 +10:00
Nyall Dawson
bd9f672aa7 Allow constraints to be added at a QgsVectorLayer level 2016-11-02 11:07:07 +10:00
Nyall Dawson
4efad04bd8 Move constraints to QgsField 2016-11-02 11:07:07 +10:00
Nyall Dawson
f6c1bf7f5b Add gui for setting/exposing constraints in field properties
Provider set constraints cannot be changed by users, ie
if a not null constraint is set on the field at the database
then QGIS users cannot clear this constraint.
2016-11-02 11:07:07 +10:00
Nyall Dawson
d1fd588499 Add method to fetch constraints from a vector data provider
Implemented for unique and not null constraints for postgres
provider
2016-11-02 11:07:07 +10:00
Nyall Dawson
5e3bef7799 Fix QgsFeatureRequest with expression not using provider fields
and limit (fix #15771)
2016-11-02 09:52:03 +10:00
Matthias Kuhn
57a57545a0 Add test for QgsFeatureRequest.setLimit and feature variable 2016-11-02 09:39:59 +10:00
Nyall Dawson
fb849620e7 Avoid unexpected gpkg test success with older GDAL versions 2016-11-02 09:39:59 +10:00
Nyall Dawson
b679cbe091 Speed up inserting features into memory layers by ~65%
By avoiding an unnecessary map lookup
2016-11-02 08:46:49 +10:00
Juergen E. Fischer
d3c7a04193 fix typo
(cherry picked from commit 658cfe68c91ec24f04f8ebda307fbec7d55a412f)
2016-11-01 13:51:49 +01:00
Juergen E. Fischer
7a326b1b8d fix typos 2016-11-01 13:46:29 +01:00
Patrick Valsecchi
667718bc89 [feature] Editor widget auto config for foreign keys (#3699)
Automatically pick RelationReference widgets for foreign keys.
2016-11-01 08:36:21 +01:00
Nyall Dawson
4f8ee78f76 Fix some no such signal/slot warnings
... in such a way that they'll never appear again
2016-11-01 14:14:16 +10:00
Martin Dobias
5e4bb00fa3 Fix import of shapefiles to postgres - regression introduced in 5abdfcb (#3652)
(cherry picked from commit a965a132c52df9308b5a58be92c04a285826485a)
2016-11-01 11:41:23 +08:00
Martin Dobias
629ca8b986 Hide import/export buttons for arcgis services as they do not work (fixes #15637)
(cherry picked from commit 1c2f0de9fbea8e90c9d20036bfa1601c1d192a89)
2016-11-01 11:41:23 +08:00
Martin Dobias
b798040040 Fixed legend renderer expected images 2016-11-01 11:41:23 +08:00
Martin Dobias
5c83b7924a Fix reordering and removal of legend nodes in composer legend
(cherry picked from commit f4e1e6f6eefec74fcf61542c3c9e236c4fb3054f)
2016-11-01 11:41:23 +08:00
Martin Dobias
90e1c93661 Fix building of legend node tree if embedded widgets are used in the layer
(cherry picked from commit 10cab93c3652c38db27553616f36290f7b820c48)
2016-11-01 11:41:23 +08:00
Martin Dobias
6b120a8600 Fix display of diagram legend entries (fixes #15448)
To make the implementation saner, the legend node that may be embedded within parent
layer node is kept separately from activeNodes.

(cherry picked from commit b385ebd9ba9272516eed61e5825a603fcee969e9)
2016-11-01 11:41:23 +08:00
Nyall Dawson
47109d13b7 Flip some connects to new style 2016-11-01 11:10:40 +10:00
Nyall Dawson
70d7ce163e Describe some dependancy changes in API break docs 2016-11-01 08:44:55 +10:00
Even Rouault
08218de5f4 [OGR provider] Use constBegin() / constEnd() 2016-10-31 19:44:34 +01:00