41560 Commits

Author SHA1 Message Date
Mathieu Pellerin
09195fb567 [processing] implement source flag for feature based algorithms (#5208) 2017-09-18 13:33:20 +07:00
Nyall Dawson
ffbb24481b Fix memory leak 2017-09-18 12:17:41 +10:00
Nyall Dawson
31f6a893ca Fix coverity unchecked return value warning 2017-09-18 12:14:38 +10:00
Nyall Dawson
57beefd474 Fix coverity uninitialized members warnings 2017-09-18 12:13:02 +10:00
Nyall Dawson
b44cf5d10f Fix memory leak 2017-09-18 12:10:46 +10:00
Mathieu Pellerin
01468d0879 Merge pull request #5204 from nirvn/saveselected_native 2017-09-16 12:17:11 +07:00
Nyall Dawson
f9bc9259c0 Merge pull request #5171 from nyalldawson/processing_selectioncheckboxes
[processing] Add useCheckBoxes option to EnumWidgetWrapper
2017-09-16 12:39:07 +10:00
Nyall Dawson
085687d8f0 Also update other spatial join alg 2017-09-16 10:21:54 +10:00
Nyall Dawson
1983d8f522 Improve wording of spatial location alg parameters 2017-09-16 09:59:13 +10:00
Nyall Dawson
95ab2321e5 Add context menu with Select All/Clear Selection to checkboxes panel 2017-09-16 09:59:13 +10:00
Nyall Dawson
5ee32392f9 Use checkboxes for Extract/Select by Location algs 2017-09-16 09:59:13 +10:00
Nyall Dawson
dd441f6154 [processing] A non-optional multiple enum parameter must have at
least one choice selected to be valid
2017-09-16 09:59:13 +10:00
Nyall Dawson
4bae647ad9 Use smaller margins for checkboxes panel 2017-09-16 09:59:13 +10:00
Nyall Dawson
ecf7dd5e4f Update class name 2017-09-16 09:59:13 +10:00
arnaud.morvan@camptocamp.com
b08119bc96 [processing] Add ui option useCheckBoxes in ByLocation algorithms 2017-09-16 09:58:35 +10:00
arnaud.morvan@camptocamp.com
53df3699fd [processing] add ui option useCheckBoxes in CheckValidity 2017-09-16 09:57:13 +10:00
arnaud.morvan@camptocamp.com
534fe21f51 [processing] Add useCheckBoxes option to SelectionWidgetWrapper
This allow to show checkboxes or radioboxes intead of line edit with button.
This is configurable for each algorithm thought ParameterSelection metadata parameter.
It is also possible to choose the number of columns.
This is not applied in case of the BatchDialog.
2017-09-16 09:57:13 +10:00
Alessandro Pasotti
7a1b9f970b DBManager -> Browser synchronization
Reload/refresh the browser tree and source select connection
items when connections, tables etc. change in the DBManager

Note that this is uni-directional: changes in the browser tree
are not (yet) propagated to the DBManager
2017-09-15 17:08:11 +02:00
Matthias Kuhn
fc561d0375
[travis] Traceback for python tests on timeout 2017-09-15 16:31:01 +02:00
Matthias Kuhn
c2162b0c27
Fix save/reload of N:M relations 2017-09-15 15:16:56 +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
Matthias Kuhn
a0819053fd
Fix N:M Relations
Fix #17143 (https://issues.qgis.org/issues/17143)
2017-09-15 12:03:14 +02:00
Nyall Dawson
5bd164b644 Merge pull request #5200 from nyalldawson/drop_handler
[FEATURE][processing] Allow dropping model files onto QGIS window to execute them
2017-09-15 19:42:46 +10:00
Nyall Dawson
f282a753c6 [processing] Fix incorrect filters in vector layer parameter selections 2017-09-15 19:41:19 +10:00
nirvn
0cdabb5e60 [needs-docs][processing] return empty layer for save
selected features algorithm if no features are selected
2017-09-15 16:16:04 +07:00
Nyall Dawson
06ee6f68e1 Expand docs 2017-09-15 18:53:29 +10:00
nirvn
04ee85f0e8 [processing] native save selected features algorithm 2017-09-15 15:51:30 +07:00
Nyall Dawson
3c3848afca Update sip_include 2017-09-15 18:39:51 +10:00
Nyall Dawson
6300464275 [FEATURE][processing] Allow drag and drop of model files onto QGIS window
to execute them
2017-09-15 18:39:51 +10:00
Nyall Dawson
0df4f4a974 Make QgsCustomDropHandler a QObject, and only store weak pointers to them
This means if a plugin registers a custom drop handler, but crashes
before it can deregister it, at least it won't leave the main
app in a crashy state.
2017-09-15 18:39:51 +10:00
Nyall Dawson
527bce09ae Allow QgsCustomDropHandlers to directly operate mime data
and dropped file names

This allows QgsCustomDropHandlers which aren't directly associated
with providers (e.g. for plugins to handle dropped files of
a certain type)
2017-09-15 18:39:51 +10:00
Nyall Dawson
373ac4537b Slightly cleanup drop handling in qgisapp 2017-09-15 18:39:51 +10:00
Alessandro Pasotti
ea28c2d91f Merge pull request #5194 from boundlessgeo/iface_conn_changed
Adds connectionsChanged signal to iface
2017-09-15 10:12:35 +02:00
Alessandro Pasotti
a13aa96b6a Typo forwarder->forwarded 2017-09-15 08:18:43 +02:00
Alessandro Pasotti
c1f765aadb Add reloadConnections to the app and expose to iface 2017-09-15 08:09:23 +02:00
Nyall Dawson
c5ae3a0c98 Merge pull request #5199 from nyalldawson/extract_by_extent2
[processing] Extent handling improvements
2017-09-15 15:52:00 +10:00
Alexander Bruy
8d088c0da4 Merge pull request #5198 from NaturalGIS/fix_saga_vectorizng_grid_classes_master
[processing] fix SAGA LTR vectorizing grid classes tool for QGIS master
2017-09-15 08:43:23 +03:00
Nyall Dawson
8605be0dbb New algorithm to convert an extent parameter to a layer
Creates a new layer with a single feature with polygon geometry
covering the extent parameter value.

This is designed for use in models where some child algorithms require
a layer based input, while others require an extent based
parameter
2017-09-15 14:21:57 +10:00
Nyall Dawson
9b112284c7 Add method to recover extent parameter CRS 2017-09-15 14:09:27 +10:00
Nyall Dawson
4fd2a1a05c Fix unit test data 2017-09-15 12:23:36 +10:00
Nyall Dawson
4eeac1c3f6 Fix passing QgsReferencedRec/Point from python to c++ 2017-09-15 08:54:37 +10:00
Nyall Dawson
cfdc3c71e7 Use geometry of reproject extent parameters for more accurate clipping 2017-09-15 08:35:42 +10:00
Nyall Dawson
60b56db904 Use CRS when calculating extent during algorithm extection 2017-09-15 08:35:11 +10:00
Nyall Dawson
80a1d71131 Return a referenced rectangle from ExtentSelectionPanel 2017-09-15 08:34:47 +10:00
Nyall Dawson
74565e22de Nicer display of rectangle parameter values 2017-09-15 08:34:13 +10:00
Nyall Dawson
ae8bc04b6c Allow use of Qgs(Referenced)Rectangle for processing extent parameter values
And add a new target CRS argument to parameterAsExtent. If set, and
the source CRS of the rectangle parameter can be determined, then
the returned value will be the rectangle automatically reprojected
to the desired target CRS.
2017-09-15 08:33:45 +10:00
Nyall Dawson
d8db3ecc4d [FEATURE] New processing algorithm "extract/clip by extent"
Allows extract a subset of another layer using an extent, with
optional setting to clip geometries to the extent
2017-09-15 08:33:19 +10:00
Giovanni Manghi
3a78253764 fix SAGA LTR vectorizing grid classes tool for QGIS master 2017-09-14 21:03:56 +01:00
Tom Elwertowski
ba9cb873ae macOS needs path to GEOS framework 2017-09-14 21:29:39 +02:00
Alessandro Pasotti
4504a1d0ad Geopackage items: add URI to tooltip 2017-09-14 17:11:24 +02:00