Keep the center hover reveal honest when panels hand off

Claiming the shared suppression flag before showing meant the outgoing
panel's close cleared it again, leaving the incoming panel open with the
indicators still revealed. Guarding the clear instead only moved the
problem: handing off to a panel that does not manage the flag left it
stuck on, and the center indicators stopped revealing on hover for good.

Claim it after the handoff instead. The panel taking over always wins,
and a handoff to a panel that knows nothing about the flag still leaves
it cleared.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-26 19:16:05 -07:00
co-authored by Claude Opus 5
parent e2d655d265
commit c619865432
4 changed files with 22 additions and 13 deletions
+9 -5
View File
@@ -70,16 +70,20 @@ Panel {
readonly property int gutterWidth: Style.space(14)
function open() {
setCenterHoverRevealSuppressed(true)
refresh()
root.controller.show()
// Set after showing, not before: showing hands the popout coordinator
// over, which closes whichever panel was open, and that close clears the
// shared flag. Deferring means the panel taking over always wins, while
// a handoff to a panel that does not manage the flag still leaves it
// cleared rather than stuck on.
Qt.callLater(function() {
if (root.opened) setCenterHoverRevealSuppressed(true)
})
}
function close() {
// Not when another panel is taking over: it has already set the shared
// flag for itself, and clearing it here would leave the incoming panel
// open with the center indicators revealed behind it.
if (!root.popoutSwitchClosing) setCenterHoverRevealSuppressed(false)
setCenterHoverRevealSuppressed(false)
root.controller.hide()
}
+9 -5
View File
@@ -33,17 +33,21 @@ Panel {
function openFromHotkey() {
openedFromHotkey = true
setCenterHoverRevealSuppressed(true)
root.controller.show()
locationFile.reload()
root.refresh()
// Set after showing, not before: showing hands the popout coordinator
// over, which closes whichever panel was open, and that close clears the
// shared flag. Deferring means the panel taking over always wins, while
// a handoff to a panel that does not manage the flag still leaves it
// cleared rather than stuck on.
Qt.callLater(function() {
if (root.opened) setCenterHoverRevealSuppressed(true)
})
}
function close() {
// Not when another panel is taking over: it has already set the shared
// flag for itself, and clearing it here would leave the incoming panel
// open with the center indicators revealed behind it.
if (!root.popoutSwitchClosing) setCenterHoverRevealSuppressed(false)
setCenterHoverRevealSuppressed(false)
if (root.editingLocation) root.cancelEditingLocation()
root.controller.hide()
}