From bc1ed7214ae0e3a117994b12737c7febaeeb3f35 Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Thu, 15 Jan 2026 17:23:12 +0200 Subject: [PATCH 1/4] Hide the mapPanelStack layers when adding a child --- app/qml/main.qml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index 0c9f8332f..d6d9e6670 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -194,19 +194,33 @@ ApplicationWindow { map.highlightPair( pair ) } - onEditingGeometryStarted: formsStackManager.geometryEditingStarted() + onEditingGeometryStarted: + { + // hide the other layers when editing the geometry + mapPanelsHideTranslation.y = mapPanelsStackView.height + formsStackManager.geometryEditingStarted() + } onEditingGeometryFinished: function( pair ) { + mapPanelsHideTranslation.y = 0 formsStackManager.geometryEditingFinished( pair ) } onEditingGeometryCanceled: { + mapPanelsHideTranslation.y = 0 formsStackManager.geometryEditingFinished( null, false ) } - onRecordInLayerFeatureStarted: formsStackManager.geometryEditingStarted() + onRecordInLayerFeatureStarted: + { + // hide the other layers when editing the geometry + mapPanelsHideTranslation.y = mapPanelsStackView.height + formsStackManager.geometryEditingStarted() + } onRecordInLayerFeatureFinished: function( pair ) { + mapPanelsHideTranslation.y = 0 formsStackManager.recordInLayerFinished( pair ) } onRecordInLayerFeatureCanceled: { + mapPanelsHideTranslation.y = 0 formsStackManager.recordInLayerFinished( null, false ) } @@ -442,6 +456,18 @@ ApplicationWindow { easing.type: Easing.OutCubic } } + + transform: Translate { + id: mapPanelsHideTranslation + y: 0 + + Behavior on y { + NumberAnimation { + duration: 500 + easing.type: Easing.OutCubic + } + } + } } Component { From a6692b0907f7ba3ca2e9ef70bd527bb035534fdc Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Fri, 16 Jan 2026 11:45:35 +0200 Subject: [PATCH 2/4] Added check for main stack depth --- app/qml/main.qml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index d6d9e6670..ac107ac75 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -196,8 +196,11 @@ ApplicationWindow { onEditingGeometryStarted: { - // hide the other layers when editing the geometry - mapPanelsHideTranslation.y = mapPanelsStackView.height + // if present in the stack, hide the other layers when editing the geometry + // use the Translation Animation to hide the stack + if(mapPanelsStackView.depth > 0){ + mapPanelsHideTranslation.y = mapPanelsStackView.height + } formsStackManager.geometryEditingStarted() } onEditingGeometryFinished: function( pair ) { @@ -211,8 +214,11 @@ ApplicationWindow { onRecordInLayerFeatureStarted: { - // hide the other layers when editing the geometry - mapPanelsHideTranslation.y = mapPanelsStackView.height + // if present in the stack, hide the other layers when editing the geometry + // use the Translation Animation to hide the stack + if(mapPanelsStackView.depth > 0){ + mapPanelsHideTranslation.y = mapPanelsStackView.height + } formsStackManager.geometryEditingStarted() } onRecordInLayerFeatureFinished: function( pair ) { From 7811c27ba33bc520377067bfdf013cbfeb5ef1e1 Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Fri, 16 Jan 2026 18:19:53 +0200 Subject: [PATCH 3/4] Added functions to hide and show map stack --- app/qml/main.qml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index ac107ac75..ac4cc508d 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -196,37 +196,29 @@ ApplicationWindow { onEditingGeometryStarted: { - // if present in the stack, hide the other layers when editing the geometry - // use the Translation Animation to hide the stack - if(mapPanelsStackView.depth > 0){ - mapPanelsHideTranslation.y = mapPanelsStackView.height - } + mapPanelsStackView.hideMapStackIfNeeded() formsStackManager.geometryEditingStarted() } onEditingGeometryFinished: function( pair ) { - mapPanelsHideTranslation.y = 0 + mapPanelsStackView.showMapStack() formsStackManager.geometryEditingFinished( pair ) } onEditingGeometryCanceled: { - mapPanelsHideTranslation.y = 0 + mapPanelsStackView.showMapStack() formsStackManager.geometryEditingFinished( null, false ) } onRecordInLayerFeatureStarted: { - // if present in the stack, hide the other layers when editing the geometry - // use the Translation Animation to hide the stack - if(mapPanelsStackView.depth > 0){ - mapPanelsHideTranslation.y = mapPanelsStackView.height - } + mapPanelsStackView.hideMapStackIfNeeded() formsStackManager.geometryEditingStarted() } onRecordInLayerFeatureFinished: function( pair ) { - mapPanelsHideTranslation.y = 0 + mapPanelsStackView.showMapStack() formsStackManager.recordInLayerFinished( pair ) } onRecordInLayerFeatureCanceled: { - mapPanelsHideTranslation.y = 0 + mapPanelsStackView.showMapStack() formsStackManager.recordInLayerFinished( null, false ) } @@ -474,6 +466,18 @@ ApplicationWindow { } } } + + function hideMapStackIfNeeded() { + // if present in the stack, hide the other layers when editing the geometry + // use the Translation Animation to hide the stack + if(mapPanelsStackView.depth > 0){ + mapPanelsHideTranslation.y = mapPanelsStackView.height + } + } + + function showMapStack(){ + mapPanelsHideTranslation.y = 0 + } } Component { From f6cca98ee2e5a6410c8685404dc87f4a3bb8f8eb Mon Sep 17 00:00:00 2001 From: Gabriel Bolbotina Date: Mon, 19 Jan 2026 17:23:41 +0200 Subject: [PATCH 4/4] Code findings addressed --- app/qml/main.qml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/qml/main.qml b/app/qml/main.qml index ac4cc508d..51f330572 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -455,28 +455,15 @@ ApplicationWindow { } } - transform: Translate { - id: mapPanelsHideTranslation - y: 0 - - Behavior on y { - NumberAnimation { - duration: 500 - easing.type: Easing.OutCubic - } - } - } - function hideMapStackIfNeeded() { // if present in the stack, hide the other layers when editing the geometry - // use the Translation Animation to hide the stack if(mapPanelsStackView.depth > 0){ - mapPanelsHideTranslation.y = mapPanelsStackView.height + mapPanelsStackView.visible = false } } function showMapStack(){ - mapPanelsHideTranslation.y = 0 + mapPanelsStackView.visible = false } }