fix: audit cleanup — themed close button, stale popup dismiss, bitfield clamp, scanner guard, process sort

This commit is contained in:
IChooseYou
2026-03-04 11:15:04 -07:00
committed by IChooseYou
parent 5944dbdc81
commit f4c7e9327d
6 changed files with 21 additions and 6 deletions

View File

@@ -966,12 +966,20 @@ void RcxEditor::applyDocument(const ComposeResult& result) {
// Reset hint line - applySelectionOverlay will repaint indicators
m_hintLine = -1;
// Restore hover state
// Restore hover state — but clear if the node was deleted
m_hoveredNodeId = savedHoverId;
m_hoveredLine = savedHoverLine;
m_hoverInside = savedHoverInside;
m_applyingDocument = false;
if (m_hoveredNodeId != 0 && !m_nodeLineIndex.contains(m_hoveredNodeId)) {
m_hoveredNodeId = 0;
m_hoveredLine = -1;
dismissHistoryPopup();
if (m_disasmPopup) m_disasmPopup->hide();
if (m_structPreviewPopup) m_structPreviewPopup->hide();
}
// Re-apply hover markers (setText() clears all Scintilla markers).
// Reset m_prevHoveredNodeId so the incremental logic re-adds markers.
// applyHoverCursor() is NOT called here — it evaluates hitTest() against