Skip to content
Snippets Groups Projects
Commit a5b564b7 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Jean-Baptiste Kempf
Browse files

qml: do not push the same view to the navigation stack

parent 8babdefb
No related branches found
No related tags found
1 merge request!4007qml: do not push the same view to the navigation stack
Pipeline #370758 passed with stage
in 16 minutes and 57 seconds
......@@ -270,6 +270,9 @@ FocusScope {
plListView: playlist
onItemClicked: {
if (selectedIndex === index)
return
const name = g_mainDisplay.tabModel.get(index).name
selectedIndex = index
if (_oldViewProperties[name] === undefined)
......
......@@ -89,6 +89,11 @@ Widgets.PageLoader {
currentView: root.view
model: tabModel
onClicked: root.loadIndex(index)
onClicked: {
if (root.pageModel[index].name === currentView.name)
return
root.loadIndex(index)
}
}
}
......@@ -57,7 +57,12 @@ Widgets.PageLoader {
model: tabModel
onClicked: root.loadIndex(index)
onClicked: {
if (root.pageModel[index].name === currentView.name)
return
root.loadIndex(index)
}
}
//---------------------------------------------------------------------------------------------
......
......@@ -85,7 +85,12 @@ Widgets.PageLoader {
currentView: root.view
model: tabModel
onClicked: root.loadIndex(index)
onClicked: {
if (root.pageModel[index].name === currentView.name)
return
root.loadIndex(index)
}
}
}
}
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