qml: eliminate animation glitching when removing a page from the wizard (back button)
This commit is contained in:
@@ -24,6 +24,11 @@ Dialog {
|
|||||||
// page.last -> pages.lastpage to propagate the state without the binding
|
// page.last -> pages.lastpage to propagate the state without the binding
|
||||||
// going stale.
|
// going stale.
|
||||||
function _loadNextComponent(comp, wdata={}) {
|
function _loadNextComponent(comp, wdata={}) {
|
||||||
|
// remove any existing pages after current page
|
||||||
|
while (pages.contentChildren[pages.currentIndex+1]) {
|
||||||
|
pages.takeItem(pages.currentIndex+1).destroy()
|
||||||
|
}
|
||||||
|
|
||||||
var page = comp.createObject(pages, {
|
var page = comp.createObject(pages, {
|
||||||
'visible': Qt.binding(function() {
|
'visible': Qt.binding(function() {
|
||||||
return pages.currentItem === this
|
return pages.currentItem === this
|
||||||
@@ -56,7 +61,6 @@ Dialog {
|
|||||||
_setWizardData(pages.contentChildren[currentIndex].wizard_data)
|
_setWizardData(pages.contentChildren[currentIndex].wizard_data)
|
||||||
pages.pagevalid = pages.contentChildren[currentIndex].valid
|
pages.pagevalid = pages.contentChildren[currentIndex].valid
|
||||||
pages.lastpage = pages.contentChildren[currentIndex].last
|
pages.lastpage = pages.contentChildren[currentIndex].last
|
||||||
pages.contentChildren[currentIndex+1].destroy()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function next() {
|
function next() {
|
||||||
|
|||||||
Reference in New Issue
Block a user