MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / scrollToSelection

Method scrollToSelection

Source/GUI/MemViewer/MemViewer.cpp:700–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700void MemViewer::scrollToSelection()
701{
702 if (m_selectionType != SelectionType::downward)
703 {
704 if (m_StartBytesSelectionPosY < 0)
705 scrollContentsBy(0, -m_StartBytesSelectionPosY);
706 else if (m_StartBytesSelectionPosY >= m_numRows)
707 scrollContentsBy(0, m_numRows - m_StartBytesSelectionPosY - 1);
708 }
709 else
710 {
711 if (m_EndBytesSelectionPosY < 0)
712 scrollContentsBy(0, -m_EndBytesSelectionPosY);
713 else if (m_EndBytesSelectionPosY >= m_numRows)
714 scrollContentsBy(0, m_numRows - m_EndBytesSelectionPosY - 1);
715 }
716
717 viewport()->update();
718}
719
720void MemViewer::copySelection(const Common::MemType type) const
721{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected