Skip to content

Commit

Permalink
Don't show the snapping badge for geometryless vector layers
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 21, 2024
1 parent 095e1ee commit 3012c0b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ ListView {

QfToolButton {
id: snappingBadge
property bool isVisible: stateMachine.state === "digitize" && qgisProject.snappingConfig.mode === Qgis.SnappingMode.AdvancedConfiguration && Type === 'layer' && LayerType === "vectorlayer"
property bool isVisible: stateMachine.state === "digitize" &&
qgisProject.snappingConfig.mode === Qgis.SnappingMode.AdvancedConfiguration &&
Type === "layer" &&
LayerType === "vectorlayer" &&
VectorLayerPointer.geometryType() !== Qgis.GeometryType.Null &&
VectorLayerPointer.geometryType() !== Qgis.GeometryType.Unknown
visible: isVisible
height: 24
width: 24
Expand Down

0 comments on commit 3012c0b

Please sign in to comment.