From b8169ae08b5973eeb0841a8f82a4b26c6e5a0b9f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 9 Sep 2018 10:08:23 -0700 Subject: [PATCH] Fix broken quit dialog transition to next app --- app/gui/AppView.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/gui/AppView.qml b/app/gui/AppView.qml index 00c26cf6..e1490a09 100644 --- a/app/gui/AppView.qml +++ b/app/gui/AppView.qml @@ -91,6 +91,8 @@ GridView { if (runningIndex >= 0 && runningIndex !== index) { quitAppDialog.appName = appModel.getRunningAppName() quitAppDialog.segueToStream = true + quitAppDialog.nextAppName = model.name + quitAppDialog.nextAppIndex = index quitAppDialog.open() return } @@ -140,8 +142,10 @@ GridView { MessageDialog { id: quitAppDialog modality:Qt.WindowModal - property string appName : ""; + property string appName : "" property bool segueToStream : false + property string nextAppName: "" + property int nextAppIndex: 0 text:"Are you sure you want to quit " + appName +"? Any unsaved progress will be lost." standardButtons: StandardButton.Yes | StandardButton.No onYes: { @@ -150,8 +154,8 @@ GridView { if (segueToStream) { // Store the session and app name if we're going to stream after // successfully quitting the old app. - params.nextAppName = model.name - params.nextSession = appModel.createSessionForApp(index) + params.nextAppName = nextAppName + params.nextSession = appModel.createSessionForApp(nextAppIndex) } else { params.nextAppName = null