From 60667dba1faf78f535d54525940fe6766528176e Mon Sep 17 00:00:00 2001 From: DeeJanuz <45082401+DeeJanuz@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:25:16 -0600 Subject: [PATCH] Pointer: don't put a vanished panel back in the visibility map The panel-edge test read visible[edgeKey], and when the last panel the cursor touched was gone from the overlay list, that added it back as hidden. The map then had more entries than there are handles, which made the 50 ms visibility poll run every frame, and since the last commit it also counted as a visibility change each time, so unchanged frames were never reused. The edge test now looks the key up without adding it. Co-Authored-By: Claude Opus 5.5 --- pointer/helper/ft-pointer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pointer/helper/ft-pointer.cpp b/pointer/helper/ft-pointer.cpp index 521c702..6ca76fe 100644 --- a/pointer/helper/ft-pointer.cpp +++ b/pointer/helper/ft-pointer.cpp @@ -2183,7 +2183,8 @@ int main() { onEdge = false; if (!dragging && best < 1e8 && !bestScene) { edgeKey = bestKey, edgePoint = bestPoint, edgeNormal = Normalize(bestNormal), edgeLast = bestPoint; - } else if (!dragging && best >= 1e8 && !edgeKey.empty() && visible[edgeKey]) { + } else if (!dragging && best >= 1e8 && !edgeKey.empty() && visible.count(edgeKey) && + visible.at(edgeKey)) { // Just off a panel: stay on its plane (see "Panel edges" at the top). const double denom = Dot(dir, edgeNormal); if (std::fabs(denom) > 1e-4) {