1
0
Fork 0

Fixed display issue when selecting more than one page on CPU page

This commit is contained in:
justin 2016-07-14 08:45:59 -06:00 committed by mrexodia
parent 6eb93678de
commit c5eee372dc
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
1 changed files with 9 additions and 4 deletions

View File

@ -771,18 +771,23 @@ void Disassembly::keyPressEvent(QKeyEvent* event)
if(event->modifiers() & Qt::ShiftModifier) //SHIFT pressed
expand = true;
dsint initialStart = getSelectionStart();
if(key == Qt::Key_Up)
selectPrevious(expand);
else
selectNext(expand);
if(getSelectionStart() < botRVA)
bool expandedUp = initialStart != getSelectionStart();
dsint modifiedSelection = expandedUp ? getSelectionStart() : getSelectionEnd();
if(modifiedSelection < botRVA)
{
setTableOffset(getSelectionStart());
setTableOffset(modifiedSelection);
}
else if(getSelectionEnd() >= topRVA)
else if(modifiedSelection >= topRVA)
{
setTableOffset(getInstructionRVA(getSelectionEnd(), -getNbrOfLineToPrint() + 2));
setTableOffset(getInstructionRVA(modifiedSelection, -getNbrOfLineToPrint() + 2));
}
updateViewport();