56515 Commits

Author SHA1 Message Date
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
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
Julien Cabieces
0dfa77ddb3 Add a new settings noProxyUrls and change UI to edit this setting 2019-07-23 19:03:51 +10:00
Julien Cabieces
906c8a1de0 fixes #28034 : Return NoProxy instead of DefaultProxy when url matches
excludes list
2019-07-23 19:03:51 +10:00
Nyall Dawson
e208bc5888 Avoid cloning symbols during label rendering
This is expensive and unnecessary
2019-07-23 17:41:39 +10:00
Nyall Dawson
baf2006b16 Correctly expand single-click search rect for show/hide label tool 2019-07-23 12:17:17 +10:00
Nyall Dawson
d8a3031d65 [needs-docs][labeling] When using the Show/Hide Label tool, a single
click on a label toggles this label

Unlike in marquee mode, where users must hold ctrl while dragging
over labels to hide them, when only a click on an existing label
is made we trigger a toggle of the label. It's a more intuitive
UX.
2019-07-23 12:17:17 +10:00
Nyall Dawson
45b23fd5b2 [callouts] Allow callout types to have icons, and use them in the type combobox
...and pick ugly icons to prompt @nirvn into action ;)
2019-07-23 12:12:18 +10:00
Nyall Dawson
ab4d8c4500 Fix tooltips in labeling widget tabs 2019-07-23 12:12:18 +10:00
Nyall Dawson
109ad22c82 Minor tweaks to labeling widget 2019-07-23 12:12:18 +10:00
Nyall Dawson
b6fb67535d Fix loss of newly created auxilary field connections in labeling widget 2019-07-23 12:12:18 +10:00
Juergen E. Fischer
1cb2562900 dwg import: set angle property for (unexpanded) inserts 2019-07-22 14:17:15 +02:00
nirvn
bc524b0e2e A couple of callouts dox fixes 2019-07-22 18:29:05 +07:00
nirvn
aab8e511bd [FEATURE][callouts] Allow specifying an offset from label area distance 2019-07-22 18:29:05 +07:00
lbartoletti
81c4b81b3b [bugfix] Fix the whole text instead of the selected part in db_manager save SQL file. fixes #30616 2019-07-22 18:41:01 +10:00
Nyall Dawson
2b554d8bab [FEATURE][callouts] Allow specifying an offset from feature distance
which controls a distance from the feature where callout lines end

Makes for visually more appealing callouts vs drawing them right
up against the edges of features
2019-07-22 18:40:08 +10:00
Nyall Dawson
c5f791e437 More consistency in labeling tooltips 2019-07-22 14:24:32 +10:00
Nyall Dawson
83418615f0 Improve tooltips for labeling toolbar 2019-07-22 14:24:32 +10:00
Nyall Dawson
9c02bd70a8 Rework unplaced labels icon for consistency with show pinned icon 2019-07-22 14:24:32 +10:00
Nyall Dawson
13af658134 Add some separators to labeling toolbar 2019-07-22 14:24:32 +10:00
Nyall Dawson
06454df67b [needs-docs] Rework "show pinned labels" icon
The original icon had an unintended effect of always looking enabled
on some platforms (due to the solid blue background rectangle)
2019-07-22 14:24:32 +10:00
Nyall Dawson
f8cd54288c Improve appearance of multiline tooltips 2019-07-22 13:38:47 +10:00
Nyall Dawson
cf1a2607eb Spelling 2019-07-22 11:34:32 +10:00
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