56777 Commits

Author SHA1 Message Date
Nyall Dawson
f2d3bdd486 [proj6] Always normalize operations, even when we are using predefined
proj coordinate operation (e.g. those stored in a project)

Fixes #30643
2019-07-26 12:52:02 +10:00
Nyall Dawson
ca13055770 Add unit tests from #30643 2019-07-26 12:52:02 +10:00
Nyall Dawson
68c4a814b4 Add unit tests from #30569 2019-07-26 12:52:02 +10:00
Nyall Dawson
8ef960442d [processing] Use lists, not maps in overlap analysis algorithm
Ensures consistent field ordering and that fields are always matched
to input layer order
2019-07-26 10:21:20 +10:00
Nyall Dawson
d775061bc6 [needs-docs] Show current tags for symbol when right clicking a symbol
in style manager
2019-07-26 06:07:29 +10:00
Nyall Dawson
644c002c8d [FEATURE] Add "Paste" action to style manager dialog menu
Allows pasting copied symbols directly into a style
2019-07-26 06:07:29 +10:00
Nyall Dawson
732bc29322 [FEATURE] Allow copying symbols from style manager
Allows symbols to be copied from the style manager dialog, so that
they can be pasted elsewhere in QGIS (e.g. in symbol or color buttons)
2019-07-26 06:07:29 +10:00
Matthias Kuhn
4e33bc1fcf
Merge pull request #30610 from signedav/fix_valuerelation
Fix multi-selection on value relation widget using string fields
2019-07-25 18:16:25 +02:00
Matthias Kuhn
916529fd4b Remove option to change selection mode of postgres and oracle dialogs 2019-07-25 17:59:36 +02:00
Matthias Kuhn
fa847d16ff Fix code style 2019-07-25 16:00:04 +02:00
Juergen E. Fischer
49a96e00d0 [FEATURE] oracle provider: add support for auth manager 2019-07-25 15:46:42 +02:00
Matthias Kuhn
43688cabf0 Hide browse button on attachment widget in attribute table
References #26948
2019-07-25 14:21:10 +02:00
David Signer
8351ccf53d no confusing comments 2019-07-25 12:06:07 +02:00
Matthias Kuhn
66cbab0a93 Code style for providers 2019-07-25 11:22:23 +02:00
Matthias Kuhn
a6875a7c78 Reset selection when data source select dialog is reopened
When the data source select dialog is closed and reopened it's much more
likely that the user wants to add a different layer than last time he was using
the dialog. So instead of offering him to add the same layer again, the selection
is cleared and he is requested to make a new selection.
2019-07-25 11:17:42 +02:00
Matthias Kuhn
35297b43cd Default to QAbstractItemView::ExtendedSelection in pg and oracle source select
This aligns the default selection behavior of the postgres and oracle source
selection with the rest of the application and other providers like geopackage.

For newcomers, the MultiSelection is rather confusing. Especially with the current
behavior inside the unified data source dialog, that remembers previous selections
it's very hard to clear pre-existing selections in large lists that are partially
hidden.
2019-07-25 11:08:00 +02:00
Matthias Kuhn
a681e1ed45
Merge pull request #30836 from m-kuhn/raster_ignore_extent
[FEATURE] Allow rendering raster layers outside the reported extent
2019-07-25 10:24:12 +02:00
David Signer
7166f77dfa handle variant as list (instead of string) when the field.type() is QVariant::List - since these values are not stored as string, the tests don't need to check the GDAL version (what shouldn't have been done before anyway because it only concerns geopackages, where this version is checked on storing data...) 2019-07-25 09:46:04 +02:00
Nyall Dawson
6d3b1574b4 Register the app bad layer handler before loading plugins
This gives plugins a chance to replace the handler without their
changes being overwriting immediately afterwards
2019-07-25 16:50:48 +10:00
Nyall Dawson
fe4a82939e [labeling] Fix empty segment sometimes created when using repeated labels 2019-07-25 15:11:16 +10:00
Nyall Dawson
35a35fbbb1 [labeling] Fix repeated line labels gravitate to start of line
Avoids situations like

1. Line length of 3cm
2. Repeat distance of 2cm
3. Label size is 1.5 cm

    2cm    1cm
/--Label--/----/

i.e. the labels are off center and gravitate toward line starts

Instead, we first calculate how many complete repeats we can fit
in, and then divide the line into even sections of this length,
avoiding the situation where some leftover segment of the line
end isn't big enough for the label to fit.
2019-07-25 15:11:16 +10:00
Nyall Dawson
00d3becef9 [labeling] Don't waste time trying to chop lines smaller then the repeat distance 2019-07-25 15:11:16 +10:00
Nyall Dawson
594e52f444 Better memory management 2019-07-25 15:11:16 +10:00
Nyall Dawson
432317f50c [labeling] Don't add duplicate points at the end of the final repeated label segment
This results in an invalid geometry and causes issues with the labeling
of this segment
2019-07-25 15:11:16 +10:00
Nyall Dawson
03d561b199 [labeling] Ensure short lines (wrt font size) still generate sufficient
candidates to ensure centered placement of labels
2019-07-25 12:11:45 +10:00
Nyall Dawson
da1b5637af Fix deprecated gdal import warnings 2019-07-25 11:25:51 +10:00
Nyall Dawson
83a842d44f Ensure ownership of path preprocessor is transferred 2019-07-25 08:41:28 +10:00
Nyall Dawson
2237c6ae99 [API][FEATURE] Allow setting a custom path pre-processor for QgsPathResolver
QgsPathResolver::setPathPreprocessor allows setting a custom path pre-processor
function, which allows for manipulation of paths and data sources prior
to resolving them to file references or layer sources.

The processor function must accept a single string argument (representing the
original file path or data source), and return a processed version of this path.

The path pre-processor function is called before any bad layer handler.

Example - replace an outdated folder path with a new one:

  def my_processor(path):
    return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace a stored database host with a new one:

  def my_processor(path):
    return path.replace('host=10.1.1.115', 'host=10.1.1.116')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace stored database credentials with new ones:

  def my_processor(path):
    path= path.replace("user='gis_team'", "user='team_awesome'")
    path = path.replace("password='cats'", "password='g7as!m*'")
    return path

  QgsPathResolver.setPathPreprocessor(my_processor)
2019-07-25 08:41:28 +10:00
Nyall Dawson
fee239dbcc Avoid storing and cloning paint effects for layers if they are just
the default stack unchanged

Speeds up cloning of symbol layers
2019-07-25 07:00:37 +10:00
Matthias Kuhn
e51a3babb7 Move WMS ignore extents to service level 2019-07-24 12:41:31 +02:00
Matthias Kuhn
5981df7adb
Merge pull request #30901 from m-kuhn/https_osm
Use https for openstreetmap
2019-07-24 11:52:20 +02:00
Matthias Kuhn
103d104303 Use https for openstreetmap
Fix #30855
2019-07-24 10:25:20 +02:00
Nyall Dawson
3174d692b1 Add a reserve method to QgsGeometryCollection
Attempts to allocate memory for at least the specified number of geometries.

If the number of geometries is known in advance, calling this function
prior to adding geometries will prevent reallocations and memory fragmentation.
2019-07-24 16:41:37 +10:00
Nyall Dawson
bbd2f65a6c Direct conversion from ogr multilinestrings to QgsGeometry
Avoid expense of converting to/from wkb
2019-07-24 16:41:37 +10:00
nirvn
8b616b646f Followup 37cd8ce: fix non-area dialog stretching 2019-07-24 12:46:21 +07:00
nirvn
37cd8ced45 [ui] Fix missing spacer in the measure dialog 2019-07-24 11:41:32 +07:00
Nyall Dawson
751f15410a Add move operators to QgsEffectStack
Results in a (very slight) performance boost with symbol copies
2019-07-24 06:31:11 +10:00
Nyall Dawson
2cd5334137 Fix large speed regression in evaluating string equality expressions
QgsExpression::isIntervalSafe is VERY expensive and should not be used
unless we HAVE to
2019-07-24 04:11:16 +10:00
Nyall Dawson
64104d3076 Fix unnecessary calculation of marker symbol bounds when labeling is not
required for a layer and symbols layers are in place

Speeds up rendering of simple marker points matching this situation
by ~3x
2019-07-24 04:10:43 +10:00
Nyall Dawson
4b79efcb19 Optimise reading of multipoints from OGR
Avoid WKB conversion on OGR side, and parsing on QGIS side, and
just handle the direct conversion of OGR geometries instead
2019-07-24 04:10:14 +10:00
Nyall Dawson
93432b2eb7 Fix svg cache file modified timeout only blocks checking the modified datetime once ever
Instead restart the timeout everytime after verifying the file hasn't changed
2019-07-24 04:09:38 +10:00
Nyall Dawson
ec1cdaae2d Fix expensive file modified time check is applied with every check of svg/image cache 2019-07-24 04:09:38 +10:00
Nyall Dawson
2994b20eda Optimise checking for active properties
Avoid copying QgsProperty values and instead use references only
2019-07-24 04:09:03 +10:00
Nyall Dawson
49307fa06b Fix some dialogs never remember geometry when using enableAutoGeometryRestore
If a dialog is created but never shown, we shouldn't save the geometry
or we'll be saving a default state only
2019-07-24 04:08:28 +10:00
Nyall Dawson
d53d267397 Show layer name in datum transform dialog, where available
Fixes #30826
2019-07-24 04:07:45 +10:00
Denis Rouzaud
1dc7b2f6ed
allow to follow redirect for custom plugin repo url (#30869) 2019-07-23 12:53:33 +02:00
Nyall Dawson
7271347b64 Cache painter path for font marker when it doesn't change
Speeds up font marker rendering by around 2x
2019-07-23 19:35:45 +10:00
David Signer
d37536e529 moved fallback json string decode part to widget to have the "PostgresString" function without JSON 2019-07-23 11:06:07 +02:00
Julien Cabieces
2f1235a3e3 correct ini file comment
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-07-23 19:03:51 +10:00
Julien Cabieces
f9a6418eda Add proxyExcludedUrls settings example in qgis_global_settings.ini file 2019-07-23 19:03:51 +10:00