Skip to content

Commit

Permalink
Update file(s): 2025-01-01
Browse files Browse the repository at this point in the history
  • Loading branch information
horsicq committed Dec 31, 2024
1 parent 1c654d9 commit b4d7fbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
20 changes: 3 additions & 17 deletions xhexview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ void XHexView::setData(QIODevice *pDevice, const OPTIONS &options, bool bReload)
adjustView();
adjustMap();

XBinary binary(pDevice, true, options.nStartAddress);
XBinary::_MEMORY_MAP memoryMap = binary.getMemoryMap();

setMemoryMap(memoryMap);
setMemoryMap(options.memoryMapRegion);

// resetCursorData();

Expand All @@ -130,13 +127,6 @@ void XHexView::setData(QIODevice *pDevice, const OPTIONS &options, bool bReload)
}
}

void XHexView::goToAddress(XADDR nAddress)
{
qint64 nViewPos = deviceOffsetToViewPos(nAddress - g_hexOptions.nStartAddress);
_goToViewPos(nViewPos);
// TODO reload
}

void XHexView::goToOffset(qint64 nOffset)
{
qint64 nViewPos = deviceOffsetToViewPos(nOffset);
Expand All @@ -145,12 +135,8 @@ void XHexView::goToOffset(qint64 nOffset)

void XHexView::setLocation(quint64 nLocation, qint32 nLocationType, qint64 nSize)
{
if (nLocationType == XBinary::LT_OFFSET) {
setDeviceSelection(nLocation, nSize);
goToOffset(nLocation);
} else if (nLocationType == XBinary::LT_ADDRESS) {
goToAddress(nLocation);
}
goToLocation(nLocation, (XBinary::LT)nLocationType);
setLocationOffset(nLocation, (XBinary::LT)nLocationType, nSize);
}

XADDR XHexView::getStartAddress()
Expand Down
1 change: 0 additions & 1 deletion xhexview.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class XHexView : public XDeviceTableEditView {
void _adjustView();
virtual void adjustView();
void setData(QIODevice *pDevice, const OPTIONS &options, bool bReload);
void goToAddress(XADDR nAddress);
void goToOffset(qint64 nOffset);
virtual void setLocation(quint64 nLocation, qint32 nLocationType, qint64 nSize);
XADDR getStartAddress(); // TODO Check mb remove
Expand Down

0 comments on commit b4d7fbf

Please sign in to comment.