7435 Commits

Author SHA1 Message Date
nirvn
c606cf8b61 Only apply device pixel ratio in scaleIconSize for tested use 2020-10-16 13:05:38 +07:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Denis Rouzaud
3ffbed314e
add field icon in DnD tree (#39400) 2020-10-16 07:47:59 +02:00
Nyall Dawson
41a30ac2e4 Better duplicate node detection/removal handling 2020-10-16 12:18:33 +10:00
Nyall Dawson
73b0e68eb2 Extract logic from QgsLineString::removeDuplicateNodes to a highly optimised check for duplicate nodes QgsLineString::hasDuplicateNodes 2020-10-16 12:18:33 +10:00
Nyall Dawson
6a570f33eb Move QgsVector methods to header to allow better compiler optimisation,
also hold Python GIL when calling them
2020-10-16 12:18:33 +10:00
Nyall Dawson
4b3703d87c Add option to regenerate primary key to QgsVectorLayerUtils.makeFeaturesCompatible
Allows us to optionally reset the fid field value when required
2020-10-16 05:04:08 +10:00
nirvn
0607504202 Move and unify scaleIconSize into QgsApplication::scaleIconSize 2020-10-15 11:48:09 +07:00
nirvn
e951aead53 Fix QgsMapSettings {mapToLayer,layerToMap}Coordinates failing with points having a nan z value 2020-10-15 10:49:58 +07:00
Nyall Dawson
f8222f0f16 [processing] Skip redundant and potentially expensive duplicate intersection
test in Split With Lines algorithm
2020-10-15 12:40:30 +10:00
Nyall Dawson
fff2098ed6 Try to fix Travis build 2020-10-15 10:15:27 +10:00
Nyall Dawson
8c79b94fcc Don't show cascaded feature deletion warnings and feedback if
joined deleted features came from an auxilary layer

As auxiliary features are intended to be intrinsicly linked to
a normal layer's features, we don't need to warn or advise when
these are deleted alongside their parent feature.
2020-10-15 10:15:27 +10:00
Nyall Dawson
56b349479b Spelling 2020-10-13 10:47:21 +10:00
Nyall Dawson
b02d7b33bd Add option to apply parameterized colors to SVGs returned by
QgsApplication::getThemePixmap
2020-10-13 10:47:21 +10:00
Etienne Trimaille
dbe2a3beb6 Add note about Python bindings in QgsAction 2020-10-13 08:25:38 +10:00
Even Rouault
a76670e521 QStringLiteral -> QLatin1String changes generated by scripts/qstringfixup.sh --all 2020-10-11 12:30:58 +10:00
Nyall Dawson
d3f038c929 Sipify 2020-10-09 11:20:09 +10:00
Nyall Dawson
cddcbe076a Improve docs 2020-10-09 11:20:09 +10:00
Nyall Dawson
4ee9feb56b Sipify 2020-10-09 11:20:09 +10:00
Nyall Dawson
2207c30a24 When calling processing.run() and an QgsProcessingExpection occurs,
don't raise a generic "something went wrong" exception but instead
ensure that the original exception with the proper error message
is raised for catching in Python instead
2020-10-09 05:17:49 +10:00
olivierdalang
ce249b5933 rotated ticks folloup : prepare_commit 2020-10-08 09:37:35 +10:00
Alessandro Pasotti
09fe306f80 Raster paletted/unique float support
Fixes #39058 an adds some small improvements in the
progress feedback.
2020-10-06 08:39:26 +10:00
Alessandro Pasotti
ac6ee22602
Merge pull request #39183 from elpaso/bugfix-gh37666-no-geometry-in-fields
Fields items: various fixes and enhancements
2020-10-05 14:38:12 +02:00
Alessandro Pasotti
399bebaf44 Fields items: various fixes and enhancements
1. expose geometry fields for PG Fixes #37666
2. add a warning message when deleting a pk
3. add a warning message when deleting a geom col
2020-10-05 12:06:54 +02:00
Alessandro Pasotti
b0189b4149 Return a proper QgsProviderConnectionException from python table()
Fixes #39151
2020-10-03 19:06:05 +10:00
vcloarec
299709994d change return type of QgsRasterDataProvider::clone() 2020-10-03 05:57:18 +10:00
Nyall Dawson
ab6bbfda1d Fix all remaining Qt QFlags deprecated constructor warnings 2020-10-02 13:04:49 +10:00
nirvn
9d105d9d59 [layer tree] Avoid needless layer tree model computations for scale-based layer visibility 2020-09-29 06:25:02 +07:00
uclaros
9953570e30 Added method to clear all individual layer settings in QgsSnappingConfig 2020-09-26 10:30:13 +10:00
Alexandre Neto
279c499bb1 Fix QgsProcessingParameterNumber docstring example
(cherry picked from commit 66011b22ce181c93aebeda1f0c320f254a67ca30)
2020-09-25 10:58:12 +10:00
Nyall Dawson
f3f226aa69 In cases where we cannot convert the map extent back to a layer's
extent and have had to resort to fetching all features from a layer,
defer the geometry clipping the map extent so that it occurs
AFTER transforming the layer's geometries to the target map extent.

This allows us to correctly clip the feature geometries in the case
that the visible extent available from the render context for the layer
is not accurate (i.e. it's a whole of globe fallback), and avoids
rendering features which fall far outside of the visible map
region.

Fixes #38878
2020-09-22 06:50:34 +10:00
Nyall Dawson
9990b84bdb Add QgsClipper::clippedLine variant which accepts a QPolygonF line
input
2020-09-22 06:50:34 +10:00
Alessandro Pasotti
1c1febc0d6
Merge pull request #38870 from elpaso/bugfix-gh38092-executesql-feedback
Add feedback to executeSql
2020-09-21 15:45:21 +02:00
Nyall Dawson
620948f809 Add method to change capitalization of QgsTextDocument 2020-09-21 12:05:54 +10:00
Nyall Dawson
ed6e9ac84c Dox++ 2020-09-21 11:05:34 +10:00
Etienne Trimaille
6076950c68 Add help string for parameters in Processing 2020-09-21 11:05:34 +10:00
Matthias Kuhn
2eaf5e6d29 Recalculate layout when legend item size changes
Fixes https://github.com/qgis/QGIS/issues/38881
2020-09-21 08:03:16 +10:00
Matthias Kuhn
673d6727ee Improve legend performance
Only recalculate the position of the icons for affected legend nodes.
Avoids brute forcing over complex legends as soon as something is changed.

Fixes #38890
2020-09-21 08:02:13 +10:00
Alessandro Pasotti
d54c3101ae Add feedback to executeSql
Fixes #38092 by adding an optional QgsFeedback argument to
the executeSql method and by implementing the PQCancel
method in the PG provider internals.

While the cancellation works well for all supported provider while
fetching results in the loop, the cancellation of a running query is now
implemented for the postgres provider connection only because the GPKG
and GDAL both rely on GDALDatasetExecuteSQL which cannot be interrupted.

This PR also introduce a few optimizations in the PG DB-Manager
code that should probably fix also other "slowness" issues that
were reported after 3.x during PG query execution.

A small UX change in th SQL dialog makes it evident to the user that
a cancellation request has been sent to the backend: the button text
is changed to "Cancellation requested, please wait..." so that for
provider connections that are not able to interrupt the running query
and must wait for the fetching loop to exit from the exeuteSql call
the user knows that something is happening and that a cancellation
request has been successfully sent.
2020-09-19 11:15:41 +02:00
Nyall Dawson
fe70bb2440 Dox 2020-09-18 11:50:27 +10:00
Nyall Dawson
c293d2c60d [sipify] Correctly collapse TypeHint annotations 2020-09-18 11:50:27 +10:00
Nyall Dawson
fe5615ea44 Hold the GIL for more geometry related methods 2020-09-18 11:50:27 +10:00
Nyall Dawson
44fb4f5f85 Dox 2020-09-18 04:34:57 +10:00
Nyall Dawson
d4a2dddac5 Tag some inexpensive, frequently called methods with the HoldGIL annotation
This prevents the Python GIL from being released before calling the method
(which is the default behaviour). For very cheap to call c++ methods the
cost of releasing the GIL can outweigh the cost of the c++ call, which means
it's more efficient to retain the hold on the GIL.

Ideally we'd do this everywhere, and switch to an explicit ReleaseGIL
annotation on functions which are slow or risky (raise exceptions, or
do something which can cause a GIL deadlock). But those are very tricky
to identify, so instead just explicitly hold the gil on cheap methods
which are likely to be called many times and could have an impact on
script performance.
2020-09-18 04:34:57 +10:00
Nyall Dawson
c44178f517 Fix seealso link 2020-09-17 19:10:52 +10:00
Nyall Dawson
49e9b613b8 [layouts] Keep a separate flag for whether only a subset of layers
are to be clipped from the project, instead of just tracking this
by the presence of any checked layers

Avoids inconsistencies between the layers which are visibly clipped
on the map vs the options which are set in the GUI.
2020-09-17 19:10:52 +10:00
Peter Petrik
fce4b27644
fix #35147 QgsMeshLayer map canvas rotation rendering (#38795)
fix #35147 QgsMeshLayer map canvas rotation rendering
2020-09-17 10:44:58 +02:00
Nyall Dawson
484ba6f979 [labeling] Add a new capitalization option for "Title Case", and
rename the confusing "Capitalize First Letter" option to
"Force First Letter to Capital"

This change is intended to clarify the role of the "capitalize
first letter" option, and to provide an option which actually
does what users expect the "capitalize first letter" option
to do.

Fixes #16539
2020-09-17 09:33:51 +10:00
Alessandro Pasotti
e79103e354 Spelling 2020-09-17 07:28:45 +10:00
Alessandro Pasotti
cbb0cb3f1c Add a warning about the usage of setInstance 2020-09-17 07:28:45 +10:00