16119 Commits

Author SHA1 Message Date
Julien Cabieces
a34442d0f3
Merge pull request #59259 from Djedouas/snapping-intersection-freeze
Fix freeze on long indexation for snapping on intersections
2024-11-19 15:43:15 +01:00
Nyall Dawson
0ead32eb41 Fix qt6 compatibility in test 2024-11-19 21:06:26 +10:00
Nyall Dawson
2abc9d92ca [sld] Don't try to write rules/categorizes without symbolizers
Only create rules/categorized categories/graduated ranges if the
associated symbol could be converted to SLD, and is not an "empty"
symbol.

Otherwise we do not generate a rule, as SLD spec requires a
Symbolizer element to be present.
2024-11-19 21:06:26 +10:00
Jacky Volpes
3b3af5791e Fix freeze on long indexation for snapping on intersections
If snap on intersections is enabled, this specific edge search with the
locator was not in relaxed mode, whereas the standard snapping is
happening in relaxed mode.

As a result, trying to use the snapping during the first indexation was
freezing QGIS while the indexation is happening, waiting for it to end.

On a layer where the indexation is longer than the timeout (30sec, i.e.
a WFS layer as in issue #51179), the locator stops abruptly and resets
itself, crashing the indexation and QGIS.
2024-11-19 11:09:31 +01:00
Mathieu Pellerin
52dd3047ac [expression] Add a to_bool() function to convert various value types into a boolean 2024-11-19 15:09:58 +07:00
Mathieu Pellerin
cdf7c82d7a [vector tiles] Handle 'to-boolean' mapboxgl expressions when importing styles 2024-11-19 15:09:40 +07:00
Nyall Dawson
dec9db6ce7 Test masks 2024-11-19 12:40:27 +10:00
Nyall Dawson
6588aa3799 Ensure per-node legend size override overrides all other size settings
Setting an explicit size for a legend node should override all other settings,
including the heights calculated from minimum/maximum symbol size.
This is because explicit fixed sizes are PER NODE, and can be used as a last-resort
for users to manually adjust the sizing of one particular legend node
2024-11-19 12:40:27 +10:00
Nyall Dawson
6bdba31fc4 Test mask updates 2024-11-19 11:15:34 +10:00
Nyall Dawson
fc74827dee Test mask updates 2024-11-19 11:15:34 +10:00
Nyall Dawson
aa6b3413e5 Test mask updates 2024-11-19 11:15:34 +10:00
Nyall Dawson
7a17557e64 Refactor QgsTextRenderer internal methods, optimise buffer render
Rework internals of QgsTextRenderer horizontal text rendering,
so that:

1. It's easier to read, cleaning up years of accumulated cruft
2. Split out bits into smaller functions
3. Reduce the amount of duplicate code for text layout, so that
there's only one function responsible for horizontal text layout
instead of multiple
4. Add shortcut optimisations for rendering text + buffer/shadow
at the same time, instead of always drawing these completely
independantly of each other and incurring the cost of text path
calculation multiple times for the same bit of text. In a simple
benchtest this reduces the time required for rendering many
text fragments with buffers from 40 seconds to 27 seconds.

There's still more we could do here, but it's a start...
2024-11-19 11:15:34 +10:00
Harrissou Sant-anna
e7c04f17e6 Apply changes from suggestion 2024-11-16 07:27:14 +10:00
Nathan Woodrow
6374a99b2e Fix #50761 - More human error on expression parser error 2024-11-16 07:27:14 +10:00
David Koňařík
f7b21861e2 Improve test_provider_eptprovider 2024-11-14 21:37:25 +01:00
Julien Cabieces
643a7a2491
Merge pull request #59440 from elpaso/bugfix-gh43992-sqlite-expression-collapse
Collapse OR nodes into IN
2024-11-14 14:56:39 +01:00
Alessandro Pasotti
72e215b0b0 Remove feature request storage 2024-11-14 10:21:50 +01:00
Jacky Volpes
625857b166 fix(QgsVectorLayer-dependencies): don't emit too many dataChanged signals 2024-11-14 10:20:47 +01:00
Jacky Volpes
578952150c fix(QgsVectorLayer-dependencies): emit dataChanged on commitChanges
Now when a feature is externally modified on save (database trigger for
example), the dataChanged signal is emitted for indexes and caches
reconstruction.
2024-11-14 10:20:47 +01:00
Alessandro Pasotti
dccbed2cc0 Address PR comments: also check for literal EQ columnref 2024-11-14 10:00:29 +01:00
Withalion
7333fafd73 Fix copcprovider tests and clang-tidy warning 2024-11-14 09:05:14 +01:00
Alessandro Pasotti
b4ca6bca6e layout 2024-11-14 08:36:24 +01:00
Nyall Dawson
feaa352e33 Make test more robust under Qt 6 2024-11-14 05:07:08 +10:00
Nyall Dawson
26f1a3395b Fix some use-after-free issues in processing test 2024-11-14 05:07:08 +10:00
Alessandro Pasotti
55135688e0 Collapse OR nodes into IN
Fixes #43992 but also implements
an optimization of OR chained nodes
by turning them into IN conditions
when possible.

On behalf of: Faunalia
2024-11-13 16:51:32 +01:00
Nyall Dawson
11946b9c5f Fix negative angles for symbols are ignored when exporting to SLD 2024-11-13 13:18:26 +10:00
Alessandro Pasotti
3000b7f01f
[forms][feature] Value relation: more options for sorting (#59404)
Implements a few newsorting options for the value relation widget:

- reverse order
- order by a specific field

the default behavior is unchanged (Key).

Fixes #54133

Funded by: Consorzio della Bonifica Renana
2024-11-13 11:21:55 +10:00
Alexander Bruy
b1cf31ba69 add native export layer metadata algorithm 2024-11-13 07:19:42 +10:00
Alexander Bruy
65a8df1be6 add native set layer metadata algorithm 2024-11-13 07:19:42 +10:00
Alexander Bruy
18fa9f6e5c add native copy layer metadata algorithm 2024-11-13 07:19:42 +10:00
Nyall Dawson
2889aa375b Fix use-after-free 2024-11-12 08:49:18 +01:00
Julien Cabieces
d45c0fbcf0 fix(MultiEdits): fire valueChanged when syncing form same fields
If not, mIsChanged state and multiedit button icon are not updated in
QgsAttributeFormEditorWidget. The former leads to not saving
modification issues when applying multi edit modifications because
widget could appear not changed.
2024-11-12 08:36:37 +10:00
Even Rouault
a1086b7643 Fix 2 tests to be compatible of GDAL 3.10
GDAL 3.10 has deprecated the MEM::: open syntax
2024-11-11 13:01:03 +10:00
Mathieu Pellerin
af337d09e2
[processing] Brand new generate elevation profile image algorithm (#59061)
* [processing] Brand new generate elevation profile image algorithm

* Add possibility to manually set the elevation profile distance/elevation min and max

* Address comment

* Add test coverage
2024-11-10 20:14:21 +07:00
Nyall Dawson
22fbd8b87a Test masks 2024-11-10 09:52:14 +11:00
Nyall Dawson
12d777f6e5 Make sure curved labels respect tab positions 2024-11-10 09:52:14 +11:00
Nyall Dawson
7badf62596 [api] Add tab positions list for QgsTextFormat
Allows setting a list of custom tab stop distances, instead
of just a single distance
2024-11-10 09:52:14 +11:00
Nyall Dawson
2edfe3e51a Move all QgsTextFormat tests to correct file 2024-11-10 09:52:14 +11:00
Nyall Dawson
5f0b796fcf Test mask 2024-11-10 09:51:55 +11:00
Nyall Dawson
4d9bbc87da Test masks 2024-11-10 09:51:55 +11:00
Nyall Dawson
0cccf4c42b Support CSS margins for block elements in HTML labels
Adds support for CSS margin properties for block elements in
the text renderer. Specifically:

- This is available for block type elements only, eg DIV, P, H1-H6.
- Margins are NOT available for spans or other non-block content (due to Qt
  limitations)
- Margins can be specified in pt units only
- Margins can be specified either via "margin-left: 5pt; margin-right:
  10pt" etc, or "margin: 5pt 0pt 10pt 0pt"
- Negative margins are supported for the bottom margin ONLY (due to Qt
  limitations)
2024-11-10 09:51:55 +11:00
Nyall Dawson
e081bed553 Don't set margins for P, H1-6 by default
We didn't use to respect these, and we can't change rendering of existing projects now
2024-11-10 09:51:55 +11:00
Nyall Dawson
5a7fbaac1b Convert block margins to QgsTextBlockFormat margins 2024-11-10 09:51:55 +11:00
Nyall Dawson
e9a51d6806 Add repr for QgsMargins 2024-11-10 09:51:55 +11:00
Martin Dobias
970047316d fix big scene export minor output changes 2024-11-08 12:44:27 +01:00
Martin Dobias
13251c2bf1 Make tessellator not flip axes and use the new option in QGIS code
We add a new setOutputZUp(true) option to QgsTessellator so that
the coordinates on output do not get flipped from [x,y,z] to [x,-z,y].

The default is still the old behavior with flipped axes (to make sure
we do not break the API), but all uses in the QGIS code were upgraded
to use the new option.

This means we do not need to add rotation to polygon / buffered line
symbol's 3D entities in 3D map views (and there's only translation left, yay!)
2024-11-08 12:44:27 +01:00
Jan Caha
3fe0ecaf1d
MDAL version 1.3.0 (#59354)
* MDAL version 1.3.0

* change type

* change types

* fix clang-tidy issues

* fix error

* update expected 2DM mesh with scientific notation

* XMDF driver can have slash (/) in layer name (path in file)
2024-11-08 12:26:56 +02:00
Martin Dobias
860494865e Do not flip axes of the 4x4 transform used by 3D point symbol
This is a part of the continued quest to get rid of the [x,-z,y]
flipped axes "Y-up" convention used in 3D scenes. Now that the world
coordinates use "Z-up" convention, we also change the 4x4 transform
used for 3D point symbols to be consistent with the rest of the code.
2024-11-08 12:23:37 +11:00
Nyall Dawson
ace375b686 Move raster iteration progress calculation to raster iterator class 2024-11-07 10:13:55 +11:00
Martin Dobias
223289fe22 fix indentation 2024-11-06 21:11:14 +01:00