From ac0b7ec46b330d124663ef26fb7d71b29d87a84f Mon Sep 17 00:00:00 2001 From: Valentin Buira Date: Wed, 31 Jul 2024 12:24:24 +0200 Subject: [PATCH 1/3] Fix visual probem in the spliting tool The buildGuideline method was cancelled --- app/qml/map/MMSplittingTools.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/qml/map/MMSplittingTools.qml b/app/qml/map/MMSplittingTools.qml index 573e9d312..197cb32e7 100644 --- a/app/qml/map/MMSplittingTools.qml +++ b/app/qml/map/MMSplittingTools.qml @@ -39,6 +39,8 @@ Item { MM.GuidelineController { id: guidelineController + allowed: true + mapSettings: root.map.mapSettings crosshairPosition: crosshair.screenPoint realGeometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.recordedGeometry, __activeLayer.vectorLayer, root.map.mapSettings ) @@ -50,7 +52,10 @@ Item { height: root.map.height width: root.map.width + markerColor: __style.deepOceanColor lineColor: __style.deepOceanColor + lineStrokeStyle: ShapePath.DashLine + lineWidth: MMHighlight.LineWidths.Narrow mapSettings: root.map.mapSettings geometry: guidelineController.guidelineGeometry @@ -62,9 +67,7 @@ Item { height: map.height width: map.width - markerColor: __style.deepOceanColor lineColor: __style.deepOceanColor - lineStrokeStyle: ShapePath.DashLine mapSettings: root.map.mapSettings geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.recordedGeometry, __activeLayer.vectorLayer, root.map.mapSettings ) From 7081bca56df48f3e04c31fcf95c7c12ca8bc002a Mon Sep 17 00:00:00 2001 From: Valentin Buira Date: Wed, 31 Jul 2024 15:02:54 +0200 Subject: [PATCH 2/3] Change default property value --- app/guidelinecontroller.h | 2 +- app/qml/map/MMSplittingTools.qml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/guidelinecontroller.h b/app/guidelinecontroller.h index 59b9eb38c..bc1d1a67b 100644 --- a/app/guidelinecontroller.h +++ b/app/guidelinecontroller.h @@ -100,7 +100,7 @@ class GuidelineController : public QObject QgsGeometry mRealGeometry; InputMapSettings *mMapSettings = nullptr; // not owned Vertex mActiveVertex; - bool mAllowed; + bool mAllowed = true; RecordingMapTool::InsertPolicy mInsertPolicy; int mActivePart = 0; int mActiveRing = 0; diff --git a/app/qml/map/MMSplittingTools.qml b/app/qml/map/MMSplittingTools.qml index 197cb32e7..0550749bd 100644 --- a/app/qml/map/MMSplittingTools.qml +++ b/app/qml/map/MMSplittingTools.qml @@ -39,8 +39,6 @@ Item { MM.GuidelineController { id: guidelineController - allowed: true - mapSettings: root.map.mapSettings crosshairPosition: crosshair.screenPoint realGeometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.recordedGeometry, __activeLayer.vectorLayer, root.map.mapSettings ) @@ -68,6 +66,7 @@ Item { width: map.width lineColor: __style.deepOceanColor + lineWidth: MMHighlight.LineWidths.Narrow mapSettings: root.map.mapSettings geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.recordedGeometry, __activeLayer.vectorLayer, root.map.mapSettings ) From af5b20566de10b057b5f2294d900652002babfcb Mon Sep 17 00:00:00 2001 From: Valentin Buira Date: Fri, 2 Aug 2024 14:15:28 +0200 Subject: [PATCH 3/3] Overrite the default color of MMHighlight to match splitting tool's color --- app/qml/map/MMSplittingTools.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/qml/map/MMSplittingTools.qml b/app/qml/map/MMSplittingTools.qml index 0550749bd..74fa1400b 100644 --- a/app/qml/map/MMSplittingTools.qml +++ b/app/qml/map/MMSplittingTools.qml @@ -65,6 +65,7 @@ Item { height: map.height width: map.width + markerColor: __style.deepOceanColor lineColor: __style.deepOceanColor lineWidth: MMHighlight.LineWidths.Narrow