Bug report #21784
@snapping_results gives no 'result' when adding feature to point layer
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | |||
Category: | Digitising | ||
Affected QGIS version: | 3.6.1 | Regression?: | No |
Operating System: | MacOS 10.12 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 29599 |
Description
Tried to use the code snippet explained in the qgis user guide as default value:with_variable( 'first_snapped_point', array_first( @snapping_results ), attribute(
get_feature_by_id(
map_get( @first_snapped_point, 'layer' ), map_get( @first_snapped_point, 'feature_id' )
),
'object_id'
) )
Worked fine if digitizing on line layer (LineStringZM). Did not work when digitizing on point layer (PointZM).
Only tested with the two layers stored in a geopackage on QGIS 3.4.6 and 3.6.1 (MacOS).
Sample project attached should get default values from features sapped on (field 'uuid').
Associated revisions
Add @snapping_results variable for points
Add @snapping_results variable for points
Add @snapping_results variable for points
History
#1 Updated by Anonymous over 5 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|a0f450df5fb1974642cef7567a7cc161af48fe79.