| 624 | } |
| 625 | |
| 626 | void RcxEditor::applySelectionOverlay(const QSet<uint64_t>& selIds) { |
| 627 | m_currentSelIds = selIds; |
| 628 | m_sci->markerDeleteAll(M_SELECTED); |
| 629 | m_sci->markerDeleteAll(M_ACCENT); |
| 630 | |
| 631 | // Clear all editable indicators, then repaint for selected lines only |
| 632 | long docLen = m_sci->SendScintilla(QsciScintillaBase::SCI_GETLENGTH); |
| 633 | m_sci->SendScintilla(QsciScintillaBase::SCI_SETINDICATORCURRENT, IND_EDITABLE); |
| 634 | m_sci->SendScintilla(QsciScintillaBase::SCI_INDICATORCLEARRANGE, (unsigned long)0, docLen); |
| 635 | |
| 636 | for (int i = 0; i < m_meta.size(); i++) { |
| 637 | if (isSyntheticLine(m_meta[i])) continue; |
| 638 | uint64_t nodeId = m_meta[i].nodeId; |
| 639 | bool isFooter = (m_meta[i].lineKind == LineKind::Footer); |
| 640 | |
| 641 | // Footers check for footerId, non-footers check for plain nodeId |
| 642 | uint64_t checkId = isFooter ? (nodeId | kFooterIdBit) : nodeId; |
| 643 | if (selIds.contains(checkId)) { |
| 644 | m_sci->markerAdd(i, M_SELECTED); |
| 645 | m_sci->markerAdd(i, M_ACCENT); |
| 646 | if (!isFooter) |
| 647 | paintEditableSpans(i); |
| 648 | } |
| 649 | } |
| 650 | |
| 651 | // Reset hint line - updateEditableIndicators will handle cursor hints |
| 652 | // on actual user navigation (not stale restored positions) |
| 653 | m_hintLine = -1; |
| 654 | |
| 655 | applyHoverHighlight(); |
| 656 | applyHoverCursor(); |
| 657 | } |
| 658 | |
| 659 | void RcxEditor::applyHoverHighlight() { |
| 660 | m_sci->markerDeleteAll(M_HOVER); |