~zsombi/ubuntu-ui-toolkit/fix-qmlapicheck

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/PageStack.qml

  • Committer: Zoltán Balogh
  • Date: 2014-09-05 04:31:31 UTC
  • mfrom: (1232.1.4 cleanStack)
  • Revision ID: zoltan@bakter.hu-20140905043131-51eoanfylvrn59wz
Ensure active and current pages are always updated in the same order in PageStack. lp:~tpeeters/ubuntu-ui-toolkit/cleanStack

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
    function push(page, properties) {
164
164
        if (internal.stack.size() > 0) internal.stack.top().active = false;
165
165
        internal.stack.push(internal.createWrapper(page, properties));
166
 
        internal.stack.top().active = true;
167
166
        internal.stackUpdated();
168
167
    }
169
168
 
181
180
        if (internal.stack.top().canDestroy) internal.stack.top().destroyObject();
182
181
        internal.stack.pop();
183
182
        internal.stackUpdated();
184
 
 
185
 
        if (internal.stack.size() > 0) internal.stack.top().active = true;
186
183
    }
187
184
 
188
185
    /*!
216
213
        }
217
214
 
218
215
        function stackUpdated() {
219
 
            pageStack.depth =+ stack.size();
220
 
            if (pageStack.depth > 0) currentPage = stack.top().object;
221
 
            else currentPage = null;
 
216
            pageStack.depth = stack.size();
 
217
            if (pageStack.depth > 0) {
 
218
                internal.stack.top().active = true;
 
219
                currentPage = stack.top().object;
 
220
            } else {
 
221
                currentPage = null;
 
222
            }
222
223
        }
223
224
    }
224
225