Bug fix for updating vertical bar when using page up/down functions.

This commit is contained in:
Matthew Budd 2020-08-22 21:42:51 -04:00
parent 4b92abdb47
commit ff3125cbf8
1 changed files with 4 additions and 0 deletions

View File

@ -1012,6 +1012,7 @@ void QHexEdit::keyPressEvent(QKeyEvent *event)
{ {
lineOffset = maxLineOffset; lineOffset = maxLineOffset;
} }
vbar->setValue( lineOffset );
resetCursor(); resetCursor();
} }
else if (event->matches(QKeySequence::MoveToPreviousPage)) else if (event->matches(QKeySequence::MoveToPreviousPage))
@ -1022,16 +1023,19 @@ void QHexEdit::keyPressEvent(QKeyEvent *event)
{ {
lineOffset = 0; lineOffset = 0;
} }
vbar->setValue( lineOffset );
resetCursor(); resetCursor();
} }
else if (event->matches(QKeySequence::MoveToEndOfDocument)) else if (event->matches(QKeySequence::MoveToEndOfDocument))
{ {
lineOffset = maxLineOffset; lineOffset = maxLineOffset;
vbar->setValue( lineOffset );
resetCursor(); resetCursor();
} }
else if (event->matches(QKeySequence::MoveToStartOfDocument)) else if (event->matches(QKeySequence::MoveToStartOfDocument))
{ {
lineOffset = 0; lineOffset = 0;
vbar->setValue( lineOffset );
resetCursor(); resetCursor();
} }
else if (event->key() == Qt::Key_Tab && (cursorPosX < 32) ) else if (event->key() == Qt::Key_Tab && (cursorPosX < 32) )