mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Solve bug to get the same index action when stackview is changed without using sidebar
This commit is contained in:
parent
27593633fc
commit
356d3ab09f
1 changed files with 5 additions and 2 deletions
|
@ -44,14 +44,16 @@ Drawer
|
||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
property var lastItem
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (listView.currentIndex != index)
|
if (listView.currentIndex != index || stackView.currentItem != lastItem)
|
||||||
{
|
{
|
||||||
listView.currentIndex = index
|
listView.currentIndex = index
|
||||||
menuList.actions[model.title]();
|
menuList.actions[model.title]();
|
||||||
|
lastItem = stackView.currentItem
|
||||||
// titleLabel.text = model.title
|
// titleLabel.text = model.title
|
||||||
// stackView.replace(model.source)
|
// stackView.replace(model.source)
|
||||||
}
|
}
|
||||||
|
@ -87,6 +89,7 @@ Drawer
|
||||||
model: ListModel
|
model: ListModel
|
||||||
{
|
{
|
||||||
id: menuList
|
id: menuList
|
||||||
|
|
||||||
property var actions :
|
property var actions :
|
||||||
{
|
{
|
||||||
"Trusted Nodes": function()
|
"Trusted Nodes": function()
|
||||||
|
@ -95,7 +98,7 @@ Drawer
|
||||||
},
|
},
|
||||||
"Search Contacts": function(){
|
"Search Contacts": function(){
|
||||||
stackView.push("qrc:/Contacts.qml",
|
stackView.push("qrc:/Contacts.qml",
|
||||||
{'searching': true} )
|
{'searching': true} )
|
||||||
|
|
||||||
},
|
},
|
||||||
"Paste Link": function()
|
"Paste Link": function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue