From b2eff70209e4b7ad6809201d81127cb9e16f8648 Mon Sep 17 00:00:00 2001 From: Vitor Vieira <155513369+VitorVieiraZ@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:09:18 -0300 Subject: [PATCH] Fix inconsistent UI/UX for read-only non-spatial layers (#3635) * wip - enhancing ui/ux * adding layerIsReadOnly condition to add feature button to be visible * using current layer property --- app/qml/layers/MMFeaturesListPage.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/qml/layers/MMFeaturesListPage.qml b/app/qml/layers/MMFeaturesListPage.qml index 41c5012c8..13042e795 100644 --- a/app/qml/layers/MMFeaturesListPage.qml +++ b/app/qml/layers/MMFeaturesListPage.qml @@ -21,6 +21,7 @@ MMComponents.MMPage { property var selectedLayer: null property bool hasToolbar: false + property bool layerIsReadOnly: selectedLayer?.readOnly ?? false signal featureClicked( var featurePair ) signal addFeatureClicked( var toLayer ) @@ -91,7 +92,7 @@ MMComponents.MMPage { anchors.bottom: parent.bottom anchors.bottomMargin: root.hasToolbar ? __style.margin20 : ( __style.safeAreaBottom + __style.margin8 ) - visible: __inputUtils.isNoGeometryLayer( root.selectedLayer ) + visible: __inputUtils.isNoGeometryLayer( root.selectedLayer ) && !root.layerIsReadOnly text: qsTr("Add feature")