62490 Commits

Author SHA1 Message Date
Matthias Kuhn
17b209e721 yes, typo 2020-05-05 21:19:05 +02:00
Matthias Kuhn
635173e654 Does not improve trust into this setup so far... 2020-05-05 21:17:03 +02:00
Matthias Kuhn
56d6b2357c Another action 2020-05-05 21:06:38 +02:00
Matthias Kuhn
77ae4cdfd2 Flake8 instead of picky pyflakes 2020-05-05 20:51:54 +02:00
Matthias Kuhn
55c15b4188 Add pyflakes test 2020-05-05 20:42:41 +02:00
Denis Rouzaud
c22c73dde2
allow fetching all features in QgsFeaturePickerWidget (#36193)
and more documentation
2020-05-05 11:08:56 +02:00
nirvn
9e91eb57d9 [layouts] When dropping an SVG onto layouts, treat it as such 2020-05-05 16:27:29 +10:00
Nyall Dawson
1b08f4cb86 Mask image 2020-05-05 16:15:12 +10:00
Nyall Dawson
1653bb80ab Regenerate legend renderer tests using a bold font, and fix too
large number of tolerance pixels in tests

The previous reference images all used such a narrow reference font
that they required a very large pixel tolerance, which was letting
through real errors.

As a result disable the json opacity test, which was completely
broken ever since it was introduced. The test had a LARGER number
of tolerance pixels than the reference images had, and accordingly
was testing nothing at all. And the issue hasn't been fixed, so
the test was a false positive... Now the test is fixed but failing
and disabled, pending someone (else) fixing the underlying issue.
2020-05-05 16:15:12 +10:00
Denis Rouzaud
afbb204236
Allow filtering WM(T)S list in source dialog (#36166) 2020-05-05 07:20:59 +02:00
Jürnjakob Dugge
0888d377e6
When reading scalebar from XML re-apply stored size after changing style (#36173)
This PR fixes the issue that when restoring a numeric scale bar layout item from an XML (such as when opening a saved project or pasting a copied item) the height of the scale bar layout item is set to a value larger than the one stored in the XML (see #26931 and #32379).

The issue arises from the fact that restoring a scale bar layout item initially creates a QgsLayoutItemScaleBar with the default style of Single Box, which has larger minimum dimensions as calculated by calculateBoxSize. The call to attemptResize in QgsLayoutItem::readXml, which tries to apply the dimensions stored in the XML, cannot set the dimensions of the scale bar layout item to be smaller than these minimum dimensions, so the dimensions are only applied correctly if they happen to be larger.

To fix this issue, this PR re-applies the stored size by calling attemptResize in QgsLayoutItemScaleBar::readPropertiesFromElement after the scale bar style has been set.

Additionally, the width of the numeric scale bar was not restored correctly because QgsLayoutItemScaleBar::finalizeRestoreFromXml calls QgsLayoutItemScaleBar::updateScale, which calls resizeToMinimumWidth(). This PR adds a check to skip resizeToMinimumWidth when the style is Numeric.

Fixes #26931, fixes #32379
2020-05-05 15:14:13 +10:00
Nyall Dawson
d3b0b895c9 Let some tests pass on proj == 6 (<7) versions 2020-05-05 15:12:51 +10:00
nirvn
249e405eb8 [image cache] Avoid creating an invalid image and painting onto it 2020-05-05 11:19:52 +07:00
Nyall Dawson
5cd87c1f34 Add unit test 2020-05-05 11:49:05 +10:00
Nyall Dawson
7a6220a77f [FEATURE][layouts] Allow overriding the default symbol for a legend node
This allows users to (optionally!) customise the symbol appearance
for a legend node, e.g. to tweak the colors or symbol sizes to better
provide a "representative" patch symbol compared with how those
corresponding features actually appear on the map.

It's useful for exaggerating symbol widths, or for manually tweaking
the colors of semi-transparent symbols so that the colors represent
the actual appearance of the symbols when rendered on top of the map
content. Or to tweak the marker interval/offset in marker lines so that the
markers are nicely spaced in the legend patch.

Fixes #14077
2020-05-05 11:49:05 +10:00
Harrissou Sant-anna
8f7bb7fe72 Replace the "Edit user expression" button icon 2020-05-05 08:29:24 +10:00
vcloarec
aa6d23d540 disable transparency for QgsInterpolatedLineRenderer 2020-05-05 05:53:25 +10:00
Harrissou Sant-anna
9ae70e3b82 Review existing tooltip and help text 2020-05-05 05:53:06 +10:00
Harrissou Sant-anna
a86413dbb0 Fix more alignment, spacing and stretching issues 2020-05-05 05:53:06 +10:00
Harrissou Sant-anna
6d87c1126b Constrain the feature preview widget size
and avoid it expanding
2020-05-05 05:53:06 +10:00
Samweli Mwakisambwe
a001adbdab
Remove special characters on wms dimension extent 2020-05-05 05:52:35 +10:00
Alexander Bruy
8aa32f71c5
Merge pull request #36129 from jgrocha/postgis-dialogue-ux-improvement
Enables Postgresql service based connections without database name
2020-05-04 20:01:40 +03:00
Jorge Gustavo Rocha
c90ce4ecd6 Do not check if database name is filled when using services 2020-05-04 15:18:43 +01:00
Martin Dobias
ac8b956640 Allow relative paths to vector tile layers in projects (fixes #36023) 2020-05-04 13:05:19 +02:00
Martin Dobias
27b5dae4bf
[quick] Fix missing images in qgis_quick library (#36152)
They were removed by mistake in 19edc99 when cleaning up .qrc handling
2020-05-04 08:37:20 +02:00
Matthias Kuhn
768d68f2bf Remove garbage
Pretty sure that was never put here on purpose
2020-05-04 16:12:29 +10:00
Paul Blottiere
d8426c3b9d
Merge pull request #36141 from pblottiere/context_restorer
Add a broader restorer mechanism for WMS
2020-05-03 23:41:25 +02:00
Clemens Raffler
096b80e444
[feature][processing] Complete random raster algorithm collection #2
This refactors and completes the recently added work on random number raster layer creation algorithms (see #35835) and reworks the single algorithm implementation proposed in #36065 to a base-algorithm solution which avoids duplicate code.

With the new algorithms aimed towards distribution based random number creation, QGIS reaches to the same level of functionality as current ArcGIS random raster creation tools. In total, the PR adds the following algorithms (normal and uniform raster layer creation algs are refactored to be in line the new naming scheme):

Create random raster layer (binomial distribution)
Create random raster layer (exponential distribution)
Create random raster layer (gamma distribution)
Create random raster layer (negative binomial distribution)
Create random raster layer (normal distribution)
Create random raster layer (poisson distribution)
Create random raster layer (uniform distribution)
2020-05-04 06:28:45 +10:00
Germap
5623229f8c
[processing] Set distanceArea CRS properly in SumLineLengths algorithm
Fix #36135
2020-05-04 06:26:56 +10:00
Nyall Dawson
66a3b090da Maybe even LESS enum classes will help? 2020-05-04 05:38:48 +10:00
Nyall Dawson
4369ffb3cc Fix test 2020-05-04 05:38:48 +10:00
Nyall Dawson
6ec369e6b7 Travis says no to enum class 2020-05-04 05:38:48 +10:00
Nyall Dawson
d6637c5dd2 Request ui changes 2020-05-04 05:38:48 +10:00
Nyall Dawson
d0ca4f31f8 Since 2020-05-04 05:38:48 +10:00
Nyall Dawson
9364196444 Add unit tests for outside polygon labels 2020-05-04 05:38:48 +10:00
Nyall Dawson
e9f024b05c Less debug noise 2020-05-04 05:38:48 +10:00
Nyall Dawson
a934f0f605 Fix broken server tests
These tests had lots of issues, including some inappropriate mask images
which nullified the tests!
2020-05-04 05:38:48 +10:00
Nyall Dawson
00df3712e1 Fix diagram placement 2020-05-04 05:38:48 +10:00
Nyall Dawson
30540120c9 Be a bit less aggresive at pruning small feature polygon label candidates 2020-05-04 05:38:48 +10:00
Nyall Dawson
9dec1ddb83 Fix some labels incorrectly flagged as unplaced when they actually are placed 2020-05-04 05:38:48 +10:00
Nyall Dawson
fd3969f046 Logic tweaks 2020-05-04 05:38:48 +10:00
Nyall Dawson
17c47f5ff0 Force a small minimum distance when label outside mode is used, so that labels don't touch the polygon by default 2020-05-04 05:38:48 +10:00
Nyall Dawson
af9bf7e944 Show distance controls when labeling outside polygon modes are enabled
Because these impact how far outside the polygons the labels will be placed
2020-05-04 05:38:48 +10:00
Nyall Dawson
e10c9f3b19 [labeling][FEATURE] Add a dedicated polygon placement mode for "outside"
When selected, labels will always be placed outside of polygons for the
layer

Sponsored by QGIS Swiss user group
2020-05-04 05:38:48 +10:00
Nyall Dawson
9fb85d3bc8 [FEATURE][labeling] Permit data defined control over placing labels outside
polygons

Options are:
- 'yes': allow placing outside the polygon if needed
- 'no': don't allow outside placements
- 'force': only ever put this label outside the polygon
2020-05-04 05:38:48 +10:00
Nyall Dawson
51820badc1 [FEATURE][labeling] Add option to allow polygon labels to be placed
outside of polygon features when required

When a label can't be placed inside the polygon and this option is checked,
then it will be automatically placed at a nicely selected location
just outside of the polygon

Sponsored by QGIS Swiss user group!
2020-05-04 05:38:48 +10:00
Nyall Dawson
10bc703fb5 Cleanup handling of multiline align combo box, and allow selection
of multiline align for polygon features

Since this DOES have a meaning in some modes, e.g. when labelling
outside of polygons
2020-05-04 05:38:48 +10:00
Nyall Dawson
e4faa3daf1 [pal] Tag more label candidates with their respective quadrants 2020-05-04 05:38:48 +10:00
Nyall Dawson
94324f93ad [pal][api] Add label candidate generation mechanism to generate candidates
outside of polygon features

Based on a tweaked version of the logic presented by Rylov & Reimer
from "A practical algorithm for the external annotation of area features" (2016),
this placement mode generates a set of label candidates which sit at a
set distance outside of a polygon's exterior ring.

Designed for candidate generation for small polygons wrt label size, or in
other cases where it's not possible or desirable to fit the label inside
the polygon features itself
2020-05-04 05:38:48 +10:00
Nyall Dawson
6da9fa287c [pal] Refactor to generalise and extract function for creating an
ordered label position for a point
2020-05-04 05:38:48 +10:00