| 433 | |
| 434 | |
| 435 | void ByteView::scrollLines(int count) |
| 436 | { |
| 437 | int newOffset = (int)m_topLine + count; |
| 438 | if (newOffset < 0) |
| 439 | m_topLine = 0; |
| 440 | else if (newOffset >= (int)m_lines.size()) |
| 441 | m_topLine = m_lines.size() - 1; |
| 442 | else |
| 443 | m_topLine = newOffset; |
| 444 | updateCache(); |
| 445 | viewport()->update(); |
| 446 | if (m_topLine < m_lines.size()) |
| 447 | { |
| 448 | m_updatingScrollBar = true; |
| 449 | uint64_t addr = m_lines[m_topLine].address; |
| 450 | verticalScrollBar()->setValue((int)(getContiguousOffsetForAddress(addr) / m_scrollBarMultiplier)); |
| 451 | m_updatingScrollBar = false; |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | |
| 456 | void ByteView::showContextAroundTop() |