24056 Commits

Author SHA1 Message Date
Nyall Dawson
7b1b51a886
Remove duplicate equality operator for QgsPointXY
We had two different(!!!!) implementations for equality operator
for QgsPointXY, with different logic (one handled empty points,
the other didn't). This compiled only because one was not marked
as const. So we'd get a DIFFERENT equality check logic depending
on whether or not the first point was const... eeek!

Remove the duplicate one, mark the better one as const
2024-10-15 16:47:46 +10:00
qgis-bot
89d834382e auto sipify 🍺 2024-10-15 05:03:20 +00:00
Nyall Dawson
bc28bfd333 Fix/suppress more duplInheritedMember warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
6b344cd1fc Remove broken swap methods, replace with standard assignment op
which correctly sets all members
2024-10-15 15:00:05 +10:00
Nyall Dawson
56e58a2f74 Remove duplicate inherited members 2024-10-15 15:00:05 +10:00
Nyall Dawson
b85e373a31 Remove duplicate methods defined in subclasses 2024-10-15 15:00:05 +10:00
Nyall Dawson
de73f3c975 Add docs 2024-10-15 15:00:05 +10:00
Nyall Dawson
967388df86 Fix cppcheck 'function can be const' warnings 2024-10-15 15:00:05 +10:00
Nyall Dawson
2084479191 Fix flipped docstrings 2024-10-15 15:00:05 +10:00
qgis-bot
c5f5d3b7ac auto sipify 🍺 2024-10-15 02:41:19 +00:00
Nyall Dawson
29b345e2c3 Add scale method option for layout scale bars
Instead of always calculating the scale along the bottom of the
map, expose a choice of methods to the user (along bottom,
middle, top, or average of the three measurements)

For new scalebars, default to the average method, which better
handles the scenario where the scale at the top or bottom of
the map cannot be calculated (eg when the top/bottom of the map
falls just outside valid areas for the map's crs)

This fixes one of the most common scenarios which cause scale
bar widths to blow out to massive sizes

Refs #55240
2024-10-15 12:38:07 +10:00
qgis-bot
40246d3509 auto sipify 🍺 2024-10-14 11:00:42 +00:00
Nyall Dawson
022852c815 Fix aggregate function returns incorrect results
When the aggregate uses variables, we need to ensure that the
cache key correctly considers the current value of ALL those
variables. Otherwise we'll return incorrect results when
an expression is re-evaluated after changing the variable
value for the context.

Fixes use of aggregate function with @symbol_label in legends.

Fixes #58221
2024-10-14 12:57:26 +02:00
qgis-bot
8d17ad3770 auto sipify 🍺 2024-10-11 06:26:46 +00:00
Nyall Dawson
4c9072e265 Only render main annotation layer in main map canvas or docked maps
Don't show it in other map canvas instances, eg the coordinate
bounds preview map

Fixes #58766
2024-10-11 16:23:37 +10:00
qgis-bot
5b47adf18d auto sipify 🍺 2024-10-11 04:58:28 +00:00
ViperMiniQ
d30a1d5d85 [api] add QgsLayerTreeView::setCurrentNode 2024-10-11 14:55:17 +10:00
qgis-bot
365320fc76 auto sipify 🍺 2024-10-11 03:36:02 +00:00
Nyall Dawson
b2d2fc9e28 Optimise text rendering for a common scenario
Reduces a lot of overhead when rendering non-buffered, non-shadowed
text. Cuts render time by ~50% in my testing.

Also introduces a "PreferText" render option, where we default
to using text painting methods in all scenarios where we know
there's no loss in rendering quality to do so. This mode should
become the new default in a future QGIS release, as it is
designed to be faster with no visible rendering differences.

Expand unit testing by covering all text render modes in all
text renderer rendering tests.
2024-10-11 13:32:53 +10:00
qgis-bot
dce1396681 auto sipify 🍺 2024-10-11 01:27:45 +00:00
Alessandro Pasotti
75c3ad0f90 Fix docstring 2024-10-11 11:24:33 +10:00
Alessandro Pasotti
9a35e0ea89 Exception for constraint expression 2024-10-11 11:24:33 +10:00
Nyall Dawson
d36982fd4d Reduce duplicate code 2024-10-11 11:22:54 +10:00
qgis-bot
f912f78c5b auto sipify 🍺 2024-10-10 13:25:02 +00:00
Jean Felder
721b0459c4
qgspolyhedralsurface: Implement isValid (#59031)
`QgsPolyhedralSurface` inherits from `QgsSurface` which implements
`QgsAbstractgeometry::isValid` by calling `isValid` from
GEOS. However, GEOS does not handle polyhedral surface. This means
that `isValid` will always return False even if the polyhedral surface
is valid.

This issue is fixed by implementing
`QgsPolyhedralSurface::isValid`. It checks that all the polygons of
the polyhedral surface are valid.
2024-10-10 15:21:47 +02:00
qgis-bot
1b796c0c66 auto sipify 🍺 2024-10-10 04:13:48 +00:00
Nyall Dawson
ef9b326d04 Apply suggestions from code review 2024-10-10 14:10:40 +10:00
Yoann Quenach de Quivillic
b1d840f5b8 Handle wrap mode in calltips 2024-10-10 14:10:40 +10:00
qgis-bot
f9b970be55 auto sipify 🍺 2024-10-10 01:36:11 +00:00
Nyall Dawson
65c654d2c8 Prep for calculating word wrapping in text document metrics 2024-10-10 11:09:18 +10:00
qgis-bot
bb9a7165e6 auto sipify 🍺 2024-10-09 22:31:03 +00:00
Germán Carrillo
4a73ef0028 [core] Address review: switch from string comparison to static const members 2024-10-10 08:27:52 +10:00
qgis-bot
c20a2ca392 auto sipify 🍺 2024-10-09 18:14:14 +00:00
Denis Rouzaud
f9c05c50d8
Merge pull request #59014 from 3nids/settings.fup.2
python implementation of enum settings editor widget wrapper  + fix crash
2024-10-09 20:10:58 +02:00
qgis-bot
0334c6f502 auto sipify 🍺 2024-10-09 11:59:13 +00:00
signedav
03f193d336
Merge pull request #58729 from signedav/categorizelegate
Improve UX of layer style categories with html
2024-10-09 13:55:56 +02:00
Denis Rouzaud
c2ef9ea125
set editor only if it is a combobox 2024-10-09 12:13:00 +02:00
Denis Rouzaud
e4b2d591db
access dynamic key part list for editor wrappers 2024-10-09 12:10:25 +02:00
Denis Rouzaud
f7a191519e
fix mixup 2024-10-09 12:08:45 +02:00
qgis-bot
756083c293 auto sipify 🍺 2024-10-09 08:23:31 +00:00
uclaros
3af3539fe1 stac gui for browser implementation 2024-10-09 10:20:10 +02:00
Denis Rouzaud
d9296002fd
fix import 2024-10-09 07:19:55 +02:00
qgis-bot
64e79914dd auto sipify 🍺 2024-10-09 03:49:26 +00:00
Even Rouault
9f605a6426 Don't use the The Word Which Must Not Be Used
I limited the renaming to things that are not in the public API and
are not setting names. This is probably more than we strictly need to
do, but at least this will help doing potential future similar 'grep'
exercises.
2024-10-09 11:50:08 +10:00
Denis Rouzaud
69993b4836
Python implementation of enum settings editor widget wrapper 2024-10-08 22:40:41 +02:00
Denis Rouzaud
08aeb133a0
use a custom type id for python implementation
otherwise, QgsSettingsEditorWidgetRegistry is creating a wrapper for this setting type and expects the cpp implemetnation
(QgsSettingsEntryBaseTemplate and not QgsSettingsEntryBase)
2024-10-08 22:19:49 +02:00
Nyall Dawson
8a61127bd0 Fix exception with older shapely versions 2024-10-08 14:33:57 +10:00
qgis-bot
95dae189f5 auto sipify 🍺 2024-10-07 23:16:48 +00:00
Germán Carrillo
0c7ea8f4b8 Address review: move qgsLessThanMaximumScale and qgsEqualToOrGreaterThanMinimumScale functions to QgsScaleUtils 2024-10-08 09:13:34 +10:00
Germán Carrillo
dd907d6bdf [core] Introduce functions qgsLessThanMaximumScale and qgsEqualToOrGreaterThanMinimumScale to make robust checks between map scale and maximum/minimum rendering scales in a scale dependent visibility context, taking non-round scales (denominators) 2024-10-08 09:13:34 +10:00