Skip to content

Commit

Permalink
Fix unneccessary confirmation dialog when saving and reopening a feat…
Browse files Browse the repository at this point in the history
…ure form
  • Loading branch information
ValentinBuira committed Dec 3, 2024
1 parent 5cf54a6 commit e5bb39c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions app/qml/form/MMFormStackController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Item {

/*
* MMFormsStackManager component is responsible for viewing feature forms, both preview and fullscreen form
* It contains a stackview where instances of FormWrapper are pushed. Latest form is not destroyed, but reused
* for next feature to reduce a cost of initializing form and AttributeController each time user selects feature.
*/
* It contains a stackview where instances of FormWrapper are pushed.
*/

property var project

Expand Down Expand Up @@ -113,8 +112,7 @@ Item {

function closeAll() {
// close permanetly all drawers (not only hide)
let form = formsStack.get( 0 )
formsStack.pop( form )
formsStack.clear()
}

function reopenAll() {
Expand Down Expand Up @@ -257,11 +255,16 @@ Item {
id: formsStack

function popOneOrClose() {
formsStack.pop()
if ( formsStack.depth > 1 ) {
formsStack.pop()
}
else{
formsStack.clear()
}

if ( formsStack.depth <= 1 )
if ( formsStack.depth === 0 )
{
root.closed() // this is the top most form, we want to keep it instantiated, just invisible
root.closed()
}
}

Expand Down

1 comment on commit e5bb39c

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

iOS - version 24.12.696711 just submitted!

Please sign in to comment.