| 511 | |
| 512 | |
| 513 | void ByteView::updateCaret() |
| 514 | { |
| 515 | // Rerender both the old caret position and the new caret position |
| 516 | for (size_t i = m_topLine; (i < m_lines.size()) && (i < (m_topLine + m_visibleRows)); i++) |
| 517 | { |
| 518 | if (((m_prevCursorAddr >= m_lines[i].address) && (m_prevCursorAddr <= (m_lines[i].address + m_lines[i].length))) |
| 519 | || ((m_cursorAddr >= m_lines[i].address) && (m_cursorAddr <= (m_lines[i].address + m_lines[i].length)))) |
| 520 | { |
| 521 | viewport()->update(0, (int)(i - m_topLine) * m_render.getFontHeight(), viewport()->size().width(), |
| 522 | m_render.getFontHeight() + 3); |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | |
| 528 | void ByteView::resizeEvent(QResizeEvent* event) |