Skip to content
Snippets Groups Projects
Commit a70e1308 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

wizardview: temporary fix for page arrangement when deleting the last account

When deleting the last account, wizard view's page can be incorrect
if the user has created an account before.

Gitlab: #43
Change-Id: I82055456a9df608d88b81fc51049b0623c6d0a35
parent b07f7afe
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@ ApplicationWindow {
function onNoAccountIsAvailable() {
mainViewLoader.setSource("")
wizardViewForApplicationStart.changePageQML(0)
wizardView.show()
}
}
......@@ -79,6 +80,8 @@ ApplicationWindow {
minimumHeight: 600
WizardView {
id: wizardViewForApplicationStart
anchors.fill: parent
onNeedToShowMainViewWindow: {
mainViewLoader.newAddedAccountIndex = accountIndex
......
......@@ -227,26 +227,26 @@ Window {
}
WizardView {
id: wizardView
id: wizardView
anchors.fill: parent
anchors.fill: parent
onNeedToShowMainViewWindow: {
mainViewLoader.newAddedAccountIndex = accountIndex
if (mainViewLoader.source.toString() !== "qrc:/src/mainview/MainView.qml") {
mainViewLoader.loaded.disconnect(slotNewAccountAdded)
mainViewLoader.loaded.connect(slotNewAccountAdded)
mainViewLoader.setSource("qrc:/src/mainview/MainView.qml")
} else {
slotNewAccountAdded()
}
mainViewStackLayout.currentIndex = 0
onNeedToShowMainViewWindow: {
mainViewLoader.newAddedAccountIndex = accountIndex
if (mainViewLoader.source.toString() !== "qrc:/src/mainview/MainView.qml") {
mainViewLoader.loaded.disconnect(slotNewAccountAdded)
mainViewLoader.loaded.connect(slotNewAccountAdded)
mainViewLoader.setSource("qrc:/src/mainview/MainView.qml")
} else {
slotNewAccountAdded()
}
mainViewStackLayout.currentIndex = 0
}
onWizardViewIsClosed: {
mainViewStackLayout.currentIndex = 0
}
onWizardViewIsClosed: {
mainViewStackLayout.currentIndex = 0
}
}
StackLayout {
id: mainViewStackLayout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment