9 Commits

Author SHA1 Message Date
Nyall Dawson
fe2292c59a Fix default value 'apply on update' setting not correctly restored
Fixes #17712
2018-01-16 16:09:41 +10:00
Alexander Bruy
1d482cf953 [processing] add groupId() method to algorithms to get unique ID of the
algorithm group.

Adapt native algorithms
2017-12-14 14:12:00 +02:00
Alessandro Pasotti
def85fa202 QgsVectorLayer code cleaning use enums instead of int
It was one of the TODOs for QGIS 3
2017-11-23 12:09:30 +01:00
Nyall Dawson
c50ee6d42f Update python code to new API 2017-10-26 07:06:34 +10:00
Jachym Cepicky
28daa1a0e0 Adding more default SHP->GPKG changes 2017-10-19 15:45:04 +02:00
Denis Rouzaud
ce109eac98
Revert "use second Dockerfile to push 2nd image"
This reverts commit 050682a37364e110f350b9c3293f662b0011036d.
2017-09-28 13:22:30 +02:00
Vincent Mora
f63c302420 [FEATURE] Add undo and redo on transaction groups (#4765)
* [FEATURE] adds undo/redo for transaction groups

[needs-docs] the undo/redo now works with transcation groups. Just check
that there is no restriction in the transaction groups doc concerning
undo.

related to #14799

The undo/redo is implemented using SAVEPOINT.

The QgsTransaction interface has been enlarged to allow savepoints
creation and management. The savepoint is destroyed on
rollbackToSavepoint to have the same behavior has the sql ROLLBACK TO
SAVEPPOINT.

To avoid the creation of a savepoint for each feature modified in bulk
editing (e.g. paste, field calculator) the logic is a bit complicated: the
savepoint is created on QgsVectorLayer::editCommandStarted and the first
actual undo command (QgsVectorLayerUndoPassthroughCommand) is
responsible for the re-creation of the savepoint in case of undo-redo.
Since the behavior must be different in case edition doesn't take place
inside an edit command, a member function has been added to
QgsVectorLayer to expose the mEditCommandActive state.

Another (commented) tricky bit is the modification of the database
structure on add/delete attributes. On undo, the attribute is removed
before the rollback to savepoint, i.e. there is a useless ALTER TABLE
issued to restore the structure just before restoring it with the
ROLLBACK TO SAVEPOINT. This is necessary to make the provider
aware of the change of structure. It could be nicer/cleaner to have a way
to reload providers metadata.

The editPaste function has also been modified to use addFeatures instead of
addFeature (plural/singular), this is at the expense of an additional "cpy"
of the clipboard in memory, but it should improve perf with postgis provider.

* fixup operator aliases
2017-09-15 14:55:43 +02:00
Sandro Santilli
8363d2f3d0 Update expected centroid, interpolated angle and located point for reference curves
These values change because they are computed on the *linearization*
of those curves, and refactoring linearization codes results in
slighly different values.

NOTE: adding or not adding the control point would also affect these
results
2017-08-25 23:06:52 +02:00
Blottiere Paul
b354986209 Add unit test 2017-06-25 14:39:54 +01:00