Skip to content

Commit bb7d2b8

Browse files
committed
Fix back button
1 parent 40a54b3 commit bb7d2b8

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

main.qml

+5-8
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ ApplicationWindow {
99
visible: stateController.state !== "loading"
1010
width: screenGeometry.width
1111
height: screenGeometry.height
12-
title: {
13-
if(stateController.state !== "viewing" || !viewer.model){
14-
return Qt.application.displayName;
15-
}
16-
return viewer.model.display.path;
17-
}
12+
title: Qt.application.displayName
1813
Component.onCompleted: {
1914
controller.startup();
2015
}
@@ -35,11 +30,13 @@ ApplicationWindow {
3530
MouseArea {
3631
anchors.fill: parent
3732
onClicked: {
38-
if(stateController.state !== "viewing"){
33+
console.log("Back button pressed");
34+
if(stateController.state === "loaded"){
35+
console.log("Quitting");
3936
Qt.quit();
4037
return;
4138
}
42-
viewer.model = undefined;
39+
console.log("Going back to main view");
4340
stateController.state = "loaded";
4441
}
4542
}

0 commit comments

Comments
 (0)