56482 Commits

Author SHA1 Message Date
Nyall Dawson
8f6f04885b [FEATURE] Add @scale_value expression variable for use when evaluating
data defined text format properties while rendering scale bar text

Allows for per-label customisation of the text format inside scale bars
2019-07-22 11:34:32 +10:00
Nyall Dawson
a85d4d129b [FEATURE] Allow data defined settings in text formats
This allows text formats to store data defined settings,
allowing them to be used wherever the text renderer is (e.g. in
layout scalebar text).
2019-07-22 11:34:32 +10:00
Nyall Dawson
19a2b0e5d5 [api] Allow data defined properties to be set in QgsTextFormat, so
that these are automatically respected whenever the format is
rendered using QgsTextRenderer

This is done transparently to the caller - so by porting away
from the raw QPainter text apis to use QgsTextRenderer instead,
then they immediately gain the ability to use data defined
properties in their text formats.
2019-07-22 11:34:32 +10:00
Nyall Dawson
859d9a7233 Add test for drawing unplaced for a feature with no candidates 2019-07-21 20:29:34 +10:00
Nyall Dawson
a70b54fa31 Use show instead of draw 2019-07-21 20:29:34 +10:00
Nyall Dawson
2345bf17ad Move show unplaced icon to near start of labeling toolbar 2019-07-21 20:29:34 +10:00
Nyall Dawson
50fdffee02 Use dedicated icon for 'show unplaced' 2019-07-21 20:29:34 +10:00
Nyall Dawson
2a829f00a4 Also draw unlabel features which correspond to features where no
candidates could be generated

E.g. lines too short for label, polygons too small for labels

(and fix some gross oldschool memory management)
2019-07-21 20:29:34 +10:00
Nyall Dawson
bae321ad28 Prioritize moving unplaced labels in the move label tool
These are most likely the ones which users are trying to move
when there's overlapping labels
2019-07-21 20:29:34 +10:00
Nyall Dawson
87282e5dd7 [needs-docs] Add checkbox to layout map label settings panel to allow
display of unplaced labels

This is independant from the main canvas setting, and can be used
to determine whether labels are missing from a particular layout map
2019-07-21 20:29:34 +10:00
Nyall Dawson
3a1b22e90f [needs-docs] Add labeling toolbar action to toggle whether unplaced
labels are displayed
2019-07-21 20:29:34 +10:00
Nyall Dawson
c3b2f77a64 [FEATURE][labeling] Allow display of unplaced labels
This setting (accessed through the project label settings dialog)
allows unplaced labels to be shown on the map. These are rendered
using a red color by default (but the color can be changed from
the label settings dialog too), allowing users to determine whether
any important labels are missing from their maps (e.g. due to
overlaps or other constraints).
2019-07-21 20:29:34 +10:00
Nyall Dawson
4868c266e3 Add API to pal to return unplaced labels after calculating the solution
to the labeling problem

And improve dox
2019-07-21 20:29:34 +10:00
Nyall Dawson
39d4145aae Append additional "QgsCalloutContext" member to callout rendering virtual
methods

While unused for now, this gives us flexibility in future to specify
additional useful contextual information about how a callout should
be rendered without breaking API (e.g. label text alignment, label
font settings, etc)
2019-07-21 20:29:34 +10:00
Nyall Dawson
8986ea2301 Allow label tools to work with curved labels 2019-07-21 07:16:35 +10:00
Nyall Dawson
1e48dfa4cd Followup callouts
- Default to straight line callout, not manhattan
- Fix incorrect clear text for min callout distance
2019-07-21 07:16:11 +10:00
Mathieu Pellerin
5f967830bd
Fix change label map tool overwritting pre-existing non-field expressions (#30830) 2019-07-20 18:09:18 +07:00
Matthias Kuhn
4e0102f3b1
Merge pull request #30816 from m-kuhn/ellipsoid_from_first_layer
Update the project ellipsoid if CRS is taken from first layer
2019-07-20 10:29:54 +02:00
nirvn
396eb92bfa [FEATURE][labels] Add multiline alignment property to the change label tool 2019-07-20 14:41:35 +07:00
Matthias Kuhn
12930b4ebe
Merge pull request #30819 from m-kuhn/gap_context
For "gap" geometry check errors, allow showing the context
2019-07-20 08:05:04 +02:00
Juergen E. Fischer
5ed9efb3b6 osgeo4w: support separate symstores 2019-07-20 03:39:38 +02:00
nirvn
6749cb3d1f Fix option dialog crash when searching in tree widget 2019-07-19 18:41:56 +07:00
Matthias Kuhn
22dbeee989 Add test for QgsGeometryCheckError::contextBoundingBox() 2019-07-19 11:59:08 +02:00
Matthias Kuhn
5e88f9096f Pretty pring QgsRectangle when using QCOMPARE 2019-07-19 11:59:08 +02:00
Matthias Kuhn
4505a4b03b For geometry validation GAP errors, allow zooming to gap or context
When a topological check returns a gap, it's sometimes better to zoom to the gap,
sometimes to show the gap in the context of the surrounding polygons. There is no
one-size-suits-all solution.
Therefore it's now possible to zoom to one by enabling the "zoom to feature(s)" button
also for topological errors.
2019-07-19 11:59:07 +02:00
Juergen E. Fischer
d5d68ad6f5 debian packaging: add qt5-image-formats-plugins dependency (implements #26559) 2019-07-19 11:51:49 +02:00
Matthias Kuhn
ce8004446a Update the project ellipsoid if CRS is taken from first layer
Fix #30815
2019-07-19 11:08:39 +02:00
Nyall Dawson
46807c7eaf Fix missing cache skip in proj 6 code path 2019-07-19 17:27:55 +10:00
nirvn
cb6ef056cf [attribute table] Fix several issues with form view's feature navigation
- Disable zoom / pan when filtering by visible features (fixes #30763)
- Disable flash / zoom / pan when not set to form view
- Do not trigger flash / zoom / pan when selection hasn't actually changed
2019-07-19 12:35:40 +07:00
Matthias Kuhn
b1e5eb09cf
Merge pull request #30748 from troopa81/fix_referencerelationwidget_addEntry
Fix addEntry for reference relation widget
2019-07-19 07:08:11 +02:00
Nyall Dawson
d439484c27 Remove disableCache argument from python bindings 2019-07-19 13:39:06 +10:00
Nyall Dawson
9015a177d0 Disable CRS and transform cache permenantly when exiting Qgis
Hopefully this will prevent additional items being added to the cache
after we've gracefully finalised proj operations, which results
in the infamous crash-on-exit fiasco...
2019-07-19 13:39:06 +10:00
Nyall Dawson
dbe7e6156e Append additional "QgsCalloutContext" member to callout rendering virtual
methods

While unused for now, this gives us flexibility in future to specify
additional useful contextual information about how a callout should
be rendered without breaking API (e.g. label text alignment, label
font settings, etc)
2019-07-19 13:38:49 +10:00
Nyall Dawson
53ca26e638 When saving a symbol to the style database, prepopulate the tags
widget with existing tags
2019-07-19 12:23:31 +10:00
Nyall Dawson
2aba793946 Fix some warnings 2019-07-19 09:22:48 +10:00
Nyall Dawson
e63e7ab714 Fix unused variable warning 2019-07-19 09:22:48 +10:00
Julien Cabieces
9a60f17565 Replace setted with set 2019-07-19 09:11:41 +10:00
Julien Cabieces
29883f18e5 fixes #29667 end feature setting mode before warning attribute form interface 2019-07-19 09:11:41 +10:00
Juergen E. Fischer
7f17345424 fix windows build 2019-07-18 23:59:16 +02:00
Nyall Dawson
7d4552d44f When importing symbols from a seperate style, prepopulate the Additional
Tags list with a drop down showing existing tags in the default style
2019-07-19 07:21:11 +10:00
Nyall Dawson
299a28b42d Show layer rendering/data access errors in the layer tree
This makes these errors more visible to users, instead of hiding
them away in the log panel
2019-07-19 07:20:40 +10:00
Nyall Dawson
33ee00f3f6 Ensure layer tree indicator icons are repainted on changes 2019-07-19 07:20:40 +10:00
Nyall Dawson
bd44f53236 Map canvas emits a signal when errors occur during rendering operations 2019-07-19 07:20:40 +10:00
rldhont
64ada4de19 [Oracle] FeatureItrator: do not request all attributes if subset is empty
Like the PostgreSQL provider, it is not necessary to request all the attributes if the request subset of attributes is empty.
2019-07-18 18:17:40 +02:00
Larry Shaffer
fe1b0ae362 [oauth2] Fix network error crash; guard reply ptr; remove error phrase
Access of reply members/properties causes crash if the reply is deleted
elsewhere. Guard cast reply object using QPointer and access all
properties immediately.
2019-07-18 09:06:36 -06:00
Nyall Dawson
b41f8e03b0 Also apply warnings to rotate label tool 2019-07-18 20:38:36 +10:00
Nyall Dawson
90bd9e04fb Auto enable layer editing when the move or change label tools
require it to make changes to a label

E.g. when a layer is set to store label x/y in a real field (not
an aux field), then that layer must be editable in order to move
labels in it. Otherwise the move operation fails, but users are
left no clue as to why the label can't be shifted...

So now we automatically switch on edits and notify the user of
this via the messagebar, and if we CAN'T make the layer editable,
we also warn them of this.
2019-07-18 20:38:36 +10:00
Alexander Bruy
d0b8d6210c
Merge pull request #30715 from alexbruy/gdal-layers
[processing] pass layer name to the gdalwarp to avoid issues with multi-layer datasources (fix #30292)
2019-07-18 10:21:03 +03:00
Nyall Dawson
4bab91cfba Fix qt warnings about invalid stylesheet 2019-07-18 17:11:53 +10:00
Nyall Dawson
781e70f37c Fix lengthy delay when clicking change label tool on a label for the
first time

Previously this was firing off the styleChanged for every new auxiliary
field created, which is a very expensive call to process (as it involves
rebuilding GUI widgets). Instead, delay the call and only it fire it
once, if we actually changed something in the style.
2019-07-18 16:55:43 +10:00