mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Fix disasm copy paste feature.
This commit is contained in:
parent
956b1fa7e9
commit
08f2d44a1d
3 changed files with 2 additions and 9 deletions
|
@ -339,15 +339,9 @@ std::string CDisAsmTableModel::GetInstructionMetadata(uint32 address) const
|
||||||
return disAsm.c_str();
|
return disAsm.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CDisAsmTableModel::TranslateAddress(uint32 windowAddress) const
|
|
||||||
{
|
|
||||||
uint32 address = windowAddress + m_windowStart;
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 CDisAsmTableModel::TranslateModelIndexToAddress(const QModelIndex& index) const
|
uint32 CDisAsmTableModel::TranslateModelIndexToAddress(const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
return TranslateAddress(index.row() * m_instructionSize);
|
return m_windowStart + (index.row() * m_instructionSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex CDisAsmTableModel::TranslateAddressToModelIndex(uint32 address) const
|
QModelIndex CDisAsmTableModel::TranslateAddressToModelIndex(uint32 address) const
|
||||||
|
|
|
@ -35,7 +35,6 @@ public:
|
||||||
void Redraw();
|
void Redraw();
|
||||||
void Redraw(uint32);
|
void Redraw(uint32);
|
||||||
|
|
||||||
uint32 TranslateAddress(uint32) const;
|
|
||||||
uint32 TranslateModelIndexToAddress(const QModelIndex&) const;
|
uint32 TranslateModelIndexToAddress(const QModelIndex&) const;
|
||||||
QModelIndex TranslateAddressToModelIndex(uint32) const;
|
QModelIndex TranslateAddressToModelIndex(uint32) const;
|
||||||
|
|
||||||
|
|
|
@ -559,7 +559,7 @@ void CDisAsmWnd::OnCopy()
|
||||||
{
|
{
|
||||||
std::string text;
|
std::string text;
|
||||||
auto selectionRange = GetSelectionRange();
|
auto selectionRange = GetSelectionRange();
|
||||||
for(uint32 address = selectionRange.first; address <= selectionRange.second; address = m_model->TranslateAddress(address + m_instructionSize))
|
for(uint32 address = selectionRange.first; address <= selectionRange.second; address += m_instructionSize)
|
||||||
{
|
{
|
||||||
if(address != selectionRange.first)
|
if(address != selectionRange.first)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue