Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,31 @@ ApplicationWindow {
map.highlightPair( pair )
}

onEditingGeometryStarted: formsStackManager.geometryEditingStarted()
onEditingGeometryStarted:
{
mapPanelsStackView.hideMapStackIfNeeded()
formsStackManager.geometryEditingStarted()
}
onEditingGeometryFinished: function( pair ) {
mapPanelsStackView.showMapStack()
formsStackManager.geometryEditingFinished( pair )
}
onEditingGeometryCanceled: {
mapPanelsStackView.showMapStack()
formsStackManager.geometryEditingFinished( null, false )
}

onRecordInLayerFeatureStarted: formsStackManager.geometryEditingStarted()
onRecordInLayerFeatureStarted:
{
mapPanelsStackView.hideMapStackIfNeeded()
formsStackManager.geometryEditingStarted()
}
onRecordInLayerFeatureFinished: function( pair ) {
mapPanelsStackView.showMapStack()
formsStackManager.recordInLayerFinished( pair )
}
onRecordInLayerFeatureCanceled: {
mapPanelsStackView.showMapStack()
formsStackManager.recordInLayerFinished( null, false )
}

Expand Down Expand Up @@ -442,6 +454,30 @@ ApplicationWindow {
easing.type: Easing.OutCubic
}
}

transform: Translate {
id: mapPanelsHideTranslation
y: 0

Behavior on y {
NumberAnimation {
duration: 500
easing.type: Easing.OutCubic
}
}
}
Comment on lines +458 to +468
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice hack :) but couldn't we use something similar to what we use in MMFormStackController.hideAll() & MMFormStackController.reopenAll()?


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 {
Expand Down
Loading