From 9ca7aecb1163a6ee55840efd95143caf7bcff860 Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Tue, 10 Sep 2024 20:06:07 -0300 Subject: [PATCH] fixing qml warnings --- app/qml/gps/MMMeasureDrawer.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/qml/gps/MMMeasureDrawer.qml b/app/qml/gps/MMMeasureDrawer.qml index 8f9f05052f..2b45796491 100644 --- a/app/qml/gps/MMMeasureDrawer.qml +++ b/app/qml/gps/MMMeasureDrawer.qml @@ -26,13 +26,13 @@ MMDrawer { readonly property alias panelHeight: root.height - property bool canCloseShape: mapCanvas.mapToolComponent.mapTool.canCloseShape - property bool closeShapeDone: mapCanvas.mapToolComponent.mapTool.closeShapeDone - property bool canUndo: mapCanvas.mapToolComponent.mapTool.canUndo + property bool canCloseShape: mapCanvas.mapToolComponent?.mapTool?.canCloseShape ?? false + property bool closeShapeDone: mapCanvas.mapToolComponent?.mapTool?.closeShapeDone ?? false + property bool canUndo: mapCanvas.mapToolComponent?.mapTool?.canUndo ?? false - property string length: __inputUtils.formatDistanceInProjectUnit( mapCanvas.mapToolComponent.mapTool.length, 1 ) - property string perimeter: __inputUtils.formatDistanceInProjectUnit( mapCanvas.mapToolComponent.mapTool.perimeter, 1 ) - property string area: __inputUtils.formatAreaInProjectUnit( mapCanvas.mapToolComponent.mapTool.area, 1 ) + property string length: __inputUtils.formatDistanceInProjectUnit( mapCanvas.mapToolComponent?.mapTool?.length ?? 0, 1 ) + property string perimeter: __inputUtils.formatDistanceInProjectUnit( mapCanvas.mapToolComponent?.mapTool?.perimeter ?? 0, 1 ) + property string area: __inputUtils.formatAreaInProjectUnit( mapCanvas.mapToolComponent?.mapTool?.area ?? 0, 1 ) signal measureFinished() signal measureDone()