59083 Commits

Author SHA1 Message Date
Nyall Dawson
e70db922d0 Avoid fragile combo box index based logic 2019-12-04 14:47:36 +10:00
Nyall Dawson
d63714ae63 Fix spelling 2019-12-04 14:47:36 +10:00
Nyall Dawson
22ea01b0fb Add a helpful label explaining obstacle weight 2019-12-04 14:47:36 +10:00
Nyall Dawson
7e6c6e721b Fix build 2019-12-04 14:47:36 +10:00
Nyall Dawson
02fffdc64b [needs-docs] Move label obstacle settings to "placement" tab
and show detailed settings in a stacked panel widget

Because:

1. The settings belong next to the placement settings, because they
affect label placement directly (and are closely associated with the
label priority setting in this tab)

2. The label settings widget is ridiculously complex and overwhelming
even for experienced QGIS users. By moving detailed settings into
stacked panels we can avoid the initial complexity of the label settings
whilst also allowing us more flexibility to expose additional settings
in future without adding to the mess. So in future, I propose we move
all detailed settings to sub panels, and leave only the initial "enable"
setting at the top level (e.g. [x] "Repeat levels" -> click settings -> see
all repeat settings).
2019-12-04 14:47:36 +10:00
Nyall Dawson
cf43104806 Add some unit tests for label settings widgets 2019-12-04 14:47:36 +10:00
Nyall Dawson
ed93ebd91c Add QgsLabelObstacleSettingsWidget widget for customising label obstacle settings 2019-12-04 14:47:36 +10:00
Nyall Dawson
de2b60d7ef Hookup data defined properties support for QgsLabelSettingsWidgetBase 2019-12-04 14:47:36 +10:00
Nyall Dawson
060cfb4eeb [api] New class QgsLabelSettingsWidgetBase
Base class for widgets which allow customisation of label engine properties,
such as label placement settings.
2019-12-04 14:47:36 +10:00
vcloarec
14c0d2c668 adds guard to prevent crash with mesh vector renderer
If the vector renderer factory returns a null ptr, this prevents QGIS crashing
.
2019-12-04 13:31:19 +10:00
Nyall Dawson
b736bf9a44 Huge speedup when labels are set to "boundary" obstacle mode
Because GEOS prepared predicates are "stubbed out" for many relation types,
such as overlaps and touches, we can get a HUGE speedup by reworking
the obstacle boundary check to utilise an intersects and within check instead
(with the same results)
2019-12-04 13:25:21 +10:00
Denis Rouzaud
42685043ad
shorter commit messages for PyQGIS docs jobs (#33189) 2019-12-03 12:02:38 +01:00
Nyall Dawson
23460272d4 Fix warnings 2019-12-03 19:38:24 +10:00
Nyall Dawson
316fd50b73 Fix tests 2019-12-03 19:38:24 +10:00
Nyall Dawson
9f63f49230 Move label obstacle settings out to their own class, and monkey patch around
to maintain current API

QgsPalLayerSettings is way too heavy, and we need to start refactoring
this into smaller atomic components
2019-12-03 19:38:24 +10:00
Nyall Dawson
f145fa96c8 [labeling] Default polygon obstacle mode is now Boundary avoidance
(This works better with the new placement engine logic)
2019-12-03 19:38:24 +10:00
Nyall Dawson
b235d31b8f Move QgsPalLayerSettings default values to header 2019-12-03 19:38:24 +10:00
Nyall Dawson
964681f0c1 Fix capitalizationation 2019-12-03 19:38:24 +10:00
Vincent Cloarec
7f415ca7a7 [FEATURE] Static particle traces for rendering mesh vector dataset (#33165)
* [FEATURE] Static particle traces for rendering mesh vector dataset

This PR permits to display directly in QGIS static particle traces for vector datasets in mesh layer without any plugin.
The user can choose in the mesh layer properties window :
- the color
- the size of the traces (line width)
- the count of particles
- the maximum length of the particle's tail
2019-12-03 08:13:36 +01:00
Nyall Dawson
ea5b4234ab Default to label placement engine v2 for newly created projects (for QGIS 3.12) 2019-12-03 13:48:45 +10:00
Nyall Dawson
9904fe8621 Refine behavior of obstacle weight slider to match feature weight slider 2019-12-03 13:48:45 +10:00
Nyall Dawson
435287260c [labels] Ensure that we show labels where we've ripped away all the candidates
when showing "unplaced labels"
2019-12-03 13:48:45 +10:00
Nyall Dawson
2c7f89a769 Fix tests 2019-12-03 13:48:45 +10:00
Nyall Dawson
19b8d43388 [needs-docs] When running in label engine v2 mode, discard any candidates where
they collide with an obstacle feature of greater weight when compared
to the label's priority

Previously, obstacle weight was used ONLY to rank a features' label
candidates relative to each other, but was never used to actually prune candidates
completely. This meant that the labeling obstacle functionality was
confusing and frustrating for users to work with -- because despite
setting layers as the maximum possible blocking weight, you'd still
see labels being placed over these features (e.g. where the labeling
engine had no other choice).

Now, (when a project is set to v2 labeling engine mode), labels will
NEVER be placed over obstacles of greater weight. This means that
labels will potentially be omitted if the only choice is to place
them over a high weighting obstacle. But ultimately, that's much
more understandable for users -- they've manually set a particular
layer to a high obstacle factor, so we should respect that and
never place labels on these features.

In the end, this change makes the labeling placement much simpler
to understand for users, and should give power users a much
nicer experience all round.

Funded by the QGIS grants program
2019-12-03 13:48:45 +10:00
Nyall Dawson
bee6ab846e Fix obstacle factor is ignored when a layer is set to blocking mode
It was only correctly being respected for fully labeled layers
2019-12-03 13:48:45 +10:00
Nyall Dawson
7f4226d209 Update labeling tests to use engine v2, update expected reference images 2019-12-03 13:48:45 +10:00
Nyall Dawson
499f240ca7 More raw double arrays to vectors 2019-12-03 13:48:45 +10:00
Juergen E. Fischer
fe9dcf1f33 azure-pipelines: fix dependency package reference 2019-12-03 01:10:18 +01:00
Alessandro Pasotti
af1c087919
Merge pull request #33185 from elpaso/mxe-64bit
Mxe 64bit
2019-12-02 10:47:02 +01:00
Matthias Kuhn
678a877704
Merge pull request #33163 from m-kuhn/dxf_server_params
Add DXF server export params NO_MTEXT and FORCE_2D
2019-12-02 08:17:06 +01:00
Matthias Kuhn
574e0ebaa1 [db_manager] Allow opening .sql files
and not only .SQL files
also allow any file extension

Fix #33173
2019-12-02 01:43:28 +10:00
Matthias Kuhn
0eee45aa16 Remove empty file 2019-12-02 01:43:06 +10:00
Matthias Kuhn
ba87ae6a3c Fix tests 2019-12-01 10:07:34 +01:00
Matthias Kuhn
e87ea5ef85 Add dox 2019-12-01 10:04:15 +01:00
Matthias Kuhn
66ef33b48b
Merge pull request #33171 from DelazJ/patch-11
Remove wrong tooltip applied to any unset vector properties tab
2019-12-01 10:01:59 +01:00
Matthias Kuhn
2bd4689091 Capizalize undocumented parameter 2019-12-01 08:39:41 +01:00
Harrissou Sant-anna
6b1dfa771a
Remove wrong tooltip applied to any unset vector properties tab
and add one to the mask tab
2019-12-01 01:23:58 +01:00
Juergen E. Fischer
4c234f21b4 add azure pipeline badge 2019-11-30 21:10:32 +01:00
Juergen E. Fischer
d33a5b56a9 azure-pipelines support
(blood, sweat and tears w/squ-ashed away)
2019-11-30 20:34:16 +01:00
Alessandro Pasotti
bc00621dfd
Merge pull request #33170 from elpaso/bugfix-gh33168-set-center-crash
Check for empty rect before calling setExtent
2019-11-30 18:57:29 +01:00
Alessandro Pasotti
21684cf927 Rename artifact to something meaningful 2019-11-30 18:19:59 +01:00
Alessandro Pasotti
dfb90bf074 64bit MXE build 2019-11-30 18:19:33 +01:00
Alessandro Pasotti
38ae1708a8 Check for empty rect before calling setExtent
this prevents an infinite recursion from setCenter

Fixes #33168
2019-11-30 17:58:26 +01:00
Even Rouault
80cf602aea
Merge pull request #33150 from rouault/cleanup_pal_constructor_destructor
[cleanup] pal.cpp: remove useless constructor and destructor
2019-11-30 10:48:02 +01:00
Even Rouault
c2dac183f7
pal.cpp: use default implementation for constructor and destructor
It is obvious that the constructor was a no-op.

Regarding the destructor, taking a mutex around an object doesn't
make sense because both the mutex and the object are member variables,
so if the pal object is used correctly, the destructor should only
be called after any other use of the object. And explicit clearing of
a unordered_map is unnecessary.
2019-11-29 21:51:00 +01:00
Matthias Kuhn
841086046f Change variable name to clarify the getter purpose 2019-11-29 18:15:42 +01:00
Matthias Kuhn
f81b680aa1 DXF export preserve dashed line style
We do not (yet) support an option to guarantee stroked parts at corners.
So also do not set this flag in the DXF export.
2019-11-29 17:58:02 +01:00
Matthias Kuhn
d10ec078d1 Add DXF server export params NO_MTEXT and FORCE_2D 2019-11-29 17:55:37 +01:00
Matthias Kuhn
23359158c9 Add tests for quadrant based DXF label support 2019-11-29 17:54:07 +01:00
Matthias Kuhn
2968fb86f6 Add quadrant based label DXF alignment support 2019-11-29 17:54:07 +01:00