1
0
Fork 0

Revert "GUI: Possibly fix #406, #401, #243 (NEEDS CHECKING)"

This reverts commit 4ea160e709.
This commit is contained in:
Nukem 2015-11-06 23:33:28 -05:00
parent fdd2945fb8
commit d165833811
2 changed files with 5 additions and 15 deletions

View File

@ -911,24 +911,16 @@ dsint AbstractTableView::getTableOffset()
return mTableOffset;
}
void AbstractTableView::setTableOffset(dsint val)
{
// Don't allow the new row value to go past the maximum
dsint wMaxOffset = getRowCount();
dsint wMaxOffset = getRowCount() - getViewableRowsCount() + 1;
wMaxOffset = wMaxOffset > 0 ? wMaxOffset : 0;
if(val > wMaxOffset)
return;
// Change the row index so that it isn't scrolled completely
// to the bottom of the table
if (val > (wMaxOffset - getViewableRowsCount()))
val -= (getViewableRowsCount() - 3);
// Signals
mTableOffset = val;
emit tableOffsetChanged(val);
// Change the scrollbar position
#ifdef _WIN64
int wNewValue = scaleFromUint64ToScrollBarRange(mTableOffset);
verticalScrollBar()->setValue(wNewValue);

View File

@ -54,10 +54,8 @@ void HexDump::printDumpAt(dsint parVA, bool select, bool repaint)
dsint wRowCount;
// Byte offset used to be aligned on the given RVA
// TODO: CHECK THIS
mByteOffset = 0;
// mByteOffset = (int)((dsint)wRVA % (dsint)wBytePerRowCount);
// mByteOffset = mByteOffset > 0 ? wBytePerRowCount - mByteOffset : 0;
mByteOffset = (int)((dsint)wRVA % (dsint)wBytePerRowCount);
mByteOffset = mByteOffset > 0 ? wBytePerRowCount - mByteOffset : 0;
// Compute row count
wRowCount = wSize / wBytePerRowCount;