File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616 /*
1717 * MMFormsStackManager component is responsible for viewing feature forms, both preview and fullscreen form
18- * It contains a stackview where instances of FormWrapper are pushed. Latest form is not destroyed, but reused
19- * for next feature to reduce a cost of initializing form and AttributeController each time user selects feature.
20- */
18+ * It contains a stackview where instances of FormWrapper are pushed.
19+ */
2120
2221 property var project
2322
@@ -113,8 +112,7 @@ Item {
113112
114113 function closeAll () {
115114 // close permanetly all drawers (not only hide)
116- let form = formsStack .get ( 0 )
117- formsStack .pop ( form )
115+ formsStack .clear ()
118116 }
119117
120118 function reopenAll () {
@@ -257,11 +255,16 @@ Item {
257255 id: formsStack
258256
259257 function popOneOrClose () {
260- formsStack .pop ()
258+ if ( formsStack .depth > 1 ) {
259+ formsStack .pop ()
260+ }
261+ else {
262+ formsStack .clear ()
263+ }
261264
262- if ( formsStack .depth <= 1 )
265+ if ( formsStack .depth === 0 )
263266 {
264- root .closed () // this is the top most form, we want to keep it instantiated, just invisible
267+ root .closed ()
265268 }
266269 }
267270
You can’t perform that action at this time.
0 commit comments