Qt/MemoryViewWidget: Keyboard navigation should observe the number of bytes per row instead of assuming 16.
This commit is contained in:
parent
b339c6cac1
commit
0e1e2323ea
|
@ -471,19 +471,19 @@ void MemoryViewWidget::keyPressEvent(QKeyEvent* event)
|
|||
switch (event->key())
|
||||
{
|
||||
case Qt::Key_Up:
|
||||
m_address -= 16;
|
||||
m_address -= m_bytes_per_row;
|
||||
Update();
|
||||
return;
|
||||
case Qt::Key_Down:
|
||||
m_address += 16;
|
||||
m_address += m_bytes_per_row;
|
||||
Update();
|
||||
return;
|
||||
case Qt::Key_PageUp:
|
||||
m_address -= rowCount() * 16;
|
||||
m_address -= rowCount() * m_bytes_per_row;
|
||||
Update();
|
||||
return;
|
||||
case Qt::Key_PageDown:
|
||||
m_address += rowCount() * 16;
|
||||
m_address += rowCount() * m_bytes_per_row;
|
||||
Update();
|
||||
return;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue