mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NPanel: clear openedPanel attempt
This commit is contained in:
@@ -12,9 +12,12 @@ Singleton {
|
||||
|
||||
// Currently opened panel
|
||||
property var openedPanel: null
|
||||
readonly property bool hasOpenedPanel: (openedPanel !== null)
|
||||
|
||||
property var registeredPanels: ({})
|
||||
|
||||
|
||||
|
||||
// Register this panel
|
||||
function registerPanel(panel) {
|
||||
registeredPanels[panel.objectName] = panel
|
||||
@@ -33,9 +36,15 @@ Singleton {
|
||||
|
||||
// Helper to keep only one panel open at any time
|
||||
function willOpenPanel(panel) {
|
||||
if (openedPanel && openedPanel != panel) {
|
||||
if (openedPanel && openedPanel !== panel) {
|
||||
openedPanel.close()
|
||||
}
|
||||
openedPanel = panel
|
||||
}
|
||||
|
||||
function closedPanel(panel) {
|
||||
if (openedPanel && openedPanel === panel) {
|
||||
openedPanel = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ Loader {
|
||||
root.closed()
|
||||
active = false
|
||||
useButtonPosition = false // Reset button position usage
|
||||
PanelService.closedPanel(root)
|
||||
}
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user