75814 Commits

Author SHA1 Message Date
Loïc Bartoletti
5aa729e3d5
Merge pull request #46357 from Koyaani/fix-advanced-digitizing-snapping
[Fix] Advanced digitizing distance when snapping
2022-02-22 13:50:36 +01:00
Antoine Facchini
7e3ea242d5
Merge branch 'master' into fix-advanced-digitizing-snapping 2022-02-22 12:56:59 +01:00
Loïc Bartoletti
25588d2c6d
Merge pull request #47467 from elpaso/bugfix-47465-advanced-digitizing-decimal-separator
Advanced digitizing: be nice with non-dot locales
2022-02-22 12:32:52 +01:00
Alessandro Pasotti
52dd15b764 Add test case for QgsAdvancedDigitizingDockWidget 2022-02-22 10:29:47 +01:00
Antoine
66b45c2d69 change version to 3.26 2022-02-22 10:17:54 +01:00
Antoine
838bb86562 remove tests on deprecated functions 2022-02-22 10:17:54 +01:00
Antoine
1a36529b2a fix typo 2022-02-22 10:17:54 +01:00
Antoine
7116a96660 add test on peprendicular constraint 2022-02-22 10:17:54 +01:00
Antoine
fb94742344 add comments 2022-02-22 10:17:54 +01:00
Antoine
c9a3b2c451 add tests 2022-02-22 10:17:54 +01:00
Antoine
aebe2df12d rename tests 2022-02-22 10:17:54 +01:00
Antoine
6230787a66 add test for issue 46352 2022-02-22 10:17:54 +01:00
Antoine
78df32f2cb test with self-snapping 2022-02-22 10:17:54 +01:00
Antoine
7895f7bce8 simplify test 2022-02-22 10:17:54 +01:00
Antoine
db69f4bebf add test for issue 46128 2022-02-22 10:17:54 +01:00
Antoine
dced518a16 fix typo 2022-02-22 10:17:54 +01:00
Antoine
0bf090e972 fix API break 2022-02-22 10:17:54 +01:00
Antoine
2e59094602 add basic tests for QgsMapToolAdvancedDigitizing 2022-02-22 10:17:54 +01:00
Antoine
a1597982b2 fixes distance line edit that shouln't editable 2022-02-22 10:17:54 +01:00
Antoine
1d96d07774 modify method name getCapacities 2022-02-22 10:17:54 +01:00
Antoine
64ab38b9e4 modify code to simplify tests 2022-02-22 10:17:53 +01:00
Antoine
5a0479f852 modify QgsMapToolAddFeature constructor 2022-02-22 10:17:53 +01:00
Antoine
e0e9600857 static default Z/M value methods 2022-02-22 08:52:54 +01:00
Antoine
2cf8189f89 Disable Z interpolation in some cases fix #46128 2022-02-22 08:52:54 +01:00
Antoine
c3df08492d fix advanced digitizing distance when snapping 2022-02-22 08:52:53 +01:00
Denis Rouzaud
36a1019582
refactoring of QgsMapToolCapture to integrate shape map tools (#46687)
* make QgsMapToolCapture capable of capturing point/line/polygons

This moves part of the code from QgsMapToolDigitizeFeature to QgsMapToolCapture so the tool can actually capture point, line and polygons. It's mainly the 'cadCanvasReleaseEvent` which has been transfered.

* use a current CaptureTechnique in QgsMapToolCapture

QgisApp has been adapted to switch between the different techniques

* add point/line/polygon specific handlers for capture map tool

* convert add part map tool to use QgsMapToolCapture capabilities

* fix use of deprecated methods

* also create a virtual handler for QgsMapToolDigitizeFeature::featureDigitized

* more dox

* use const abstract geom in virtual handlers

* add new class QgsMapToolCaptureLayerGeometry to handle layer specific operation in capture map tool

such as avoiding intersections

* allow to add linear geometries on curved geometry layers

* make actions exclusive

* add settings registry to app

* add a registry for shape map tools

* abstract class for shape map tools

* adapt QgsMapToolCapture to correctly support shape map tools

* clean up of QgisApp

* new class QgsMapToolsDigitizingTechniqueManager to handle actions in app related to capture map tools

* clean up QgisInterface

* sipify

* refactoring of existing shape tools

* refactor add ring to fully support capture map tool

* add missing folder to Doxygen

* fix layout

* fix erasing at iterator pos

* fix unused warning

* fix more dox

* fix cpp check warning

* fix unused warning

* fix annotation map tool does not support shape + set tool name

* correctly handle case when the capture is not done on a vector layer (annotation, mesh, …)

* enable shapes in annotation map tool

* correctly undo and clean

* adapt existing shape tests

the deletion test with circular vertices has been dropped since the capture map tool behaves differently

* fix warning

* refactor fill ring to support shape digitizing

* fix win build

* fix more tests

* avoid detach warnings

* fix app test + clean up

* harmonize new settings with existing ones

* fix categories

* support adding multi lines as a part

* fix adding curve part to multi line

* also handle points

* code a bit clearer

* cast not always valid

* allow adding curved polygon to multipolygon

* add test for QgsGeometry::addPart with curved parts on non-curved geoms (lines and polygons)

* fix with Python < 3.9

* better dox for deprecated interface actions methods

* remove files leftover

* remove leftover circular string curve point tool

* add default Z/M values when calling QgsGeometry::coerceToType

* Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* fixes from review

* move layer specific part to specific tool

* fix typo

* fix leak

* fix dox

* fix segmentization

* call map tool implementation of addCurve when adding trace curve to avoid point duplication

* call sub-class implementation

* fix since 3.24 -> 3.26

* fix test

* add test to avoid extra curves when using tracing

* fix headers

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2022-02-22 07:59:50 +01:00
Denis Rouzaud
4185783e63 fix headers 2022-02-22 07:46:21 +01:00
Denis Rouzaud
f7cf0f5db8 add test to avoid extra curves when using tracing 2022-02-21 17:25:11 +01:00
Denis Rouzaud
68702f11b5 fix test 2022-02-21 17:25:00 +01:00
Alessandro Pasotti
db10e7d4ec Advanced digitizing: be nice with non-dot locales
Fix #47465
2022-02-21 17:15:01 +01:00
Denis Rouzaud
efcf169a09 fix since 3.24 -> 3.26 2022-02-21 17:05:13 +01:00
Denis Rouzaud
d8c6574e39 call sub-class implementation 2022-02-21 17:00:50 +01:00
Denis Rouzaud
b827f3492e call map tool implementation of addCurve when adding trace curve to avoid point duplication 2022-02-21 17:00:50 +01:00
Denis Rouzaud
002fd4bdce fix segmentization 2022-02-21 17:00:50 +01:00
Denis Rouzaud
8fbd474e1a fix dox 2022-02-21 11:18:04 +01:00
Denis Rouzaud
3cccf4fc0c fix leak 2022-02-21 10:33:26 +01:00
Denis Rouzaud
4f87cee0a0 fix typo 2022-02-21 10:33:26 +01:00
Denis Rouzaud
49b5926570 move layer specific part to specific tool 2022-02-21 10:33:26 +01:00
Denis Rouzaud
e9fc54c0bd fixes from review 2022-02-21 09:45:27 +01:00
Julien Cabieces
2d2cd13c58
Merge pull request #47392 from signedav/fix_relref_nomodal
Avoid modal dialogs in relation reference /  relation editor
2022-02-21 09:10:49 +01:00
Denis Rouzaud
7b86867cfa Apply suggestions from code review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2022-02-21 08:46:26 +01:00
Nyall Dawson
914dccbd5b Allow access to feature geometry in generator subsymbols via
geometry($currentfeature)

When used in a geometry generator subsymbol, the expression

    geometry($currentfeature)

should refer to the original feature's geometry, not the geometry
generated by the generator symbol (which is accessible through
$geometry)

Fixes #46455
2022-02-21 13:04:07 +10:00
Nyall Dawson
84f3b42861 The $geometry function should return the expression context's geometry
IF it has been explicitly set, not the context's feature's geometry

Refs #46455
2022-02-21 13:04:07 +10:00
Nyall Dawson
11a8d40a86 Allow geometries to be set separate to features in expression contexts
Refs #46455 -- we need a way to separate these too, as we don't always
want $geometry to refer to a feature's geometry
2022-02-21 13:04:07 +10:00
nirvn
a8eaf46995 Apply same group<->ELSE behavior to the {3D,labeling} ruling based renderer 2022-02-21 11:19:58 +10:00
nirvn
002cfb0375 Add test case covering fix 2022-02-21 11:19:58 +10:00
Nyall Dawson
7a27ff6dc6 Fix disabled children in a rule without a symbol incorrectly result in features rendered by parent level ELSE rule 2022-02-21 11:19:58 +10:00
Sandro Santilli
affa44e41e Use read-only connection when writing is not needed 2022-02-21 09:13:20 +10:00
nirvn
4324a2a8b5 [auxiliary storage] Avoid needless spatialite database connection 2022-02-21 09:08:22 +10:00
Alessandro Pasotti
2f9dd9a66f Fix NULL HTML edit widget
Fix #47363
2022-02-21 08:38:36 +10:00