Other: fix popup behaviour

This commit is contained in:
Alexander Bilyak
2021-10-27 17:18:50 +02:00
committed by Jakub
parent 8c9d5c54fc
commit cf6ed81a00

View File

@ -76,11 +76,6 @@ T.ApplicationWindow {
root.popupVisible.visible = false root.popupVisible.visible = false
} }
// do nothing if there is already visible popup
if (root.popupVisible) {
return
}
var topmost = null var topmost = null
for (var i = 0; i < popups.count; i++) { for (var i = 0; i < popups.count; i++) {
var obj = popups.get(i) var obj = popups.get(i)
@ -100,13 +95,18 @@ T.ApplicationWindow {
topmost = obj topmost = obj
} }
if (root.popupVisible !== topmost) {
if (root.popupVisible) {
root.popupVisible.visible = false
}
root.popupVisible = topmost root.popupVisible = topmost
}
if (!topmost) { if (!root.popupVisible) {
return return
} }
topmost.visible = true root.popupVisible.visible = true
} }
Connections { Connections {