mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Don't modify disassembly focus on CPU state change
This commit is contained in:
parent
a7271697a2
commit
20c3178dfe
|
@ -262,7 +262,7 @@ void CpuWidget::onVMPaused()
|
|||
}
|
||||
else
|
||||
{
|
||||
m_ui.disassemblyWidget->gotoAddress(m_cpu.getPC());
|
||||
m_ui.disassemblyWidget->gotoAddress(m_cpu.getPC(), false);
|
||||
}
|
||||
|
||||
reloadCPUWidgets();
|
||||
|
@ -501,7 +501,7 @@ void CpuWidget::contextRemoveSearchResult()
|
|||
|
||||
const int selectedResultIndex = m_ui.listSearchResults->row(m_ui.listSearchResults->selectedItems().first());
|
||||
auto* rowToRemove = m_ui.listSearchResults->takeItem(selectedResultIndex);
|
||||
if (m_searchResults.size() > selectedResultIndex && m_searchResults.at(selectedResultIndex) == rowToRemove->data(256).toUInt())
|
||||
if (m_searchResults.size() > static_cast<size_t>(selectedResultIndex) && m_searchResults.at(selectedResultIndex) == rowToRemove->data(256).toUInt())
|
||||
{
|
||||
m_searchResults.erase(m_searchResults.begin() + selectedResultIndex);
|
||||
}
|
||||
|
|
|
@ -837,7 +837,7 @@ QString DisassemblyWidget::FetchSelectionInfo(SelectionInfo selInfo)
|
|||
return infoBlock;
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoAddress(u32 address)
|
||||
void DisassemblyWidget::gotoAddress(u32 address, bool should_set_focus)
|
||||
{
|
||||
const u32 destAddress = address & ~3;
|
||||
// Center the address
|
||||
|
@ -846,7 +846,8 @@ void DisassemblyWidget::gotoAddress(u32 address)
|
|||
m_selectedAddressEnd = destAddress;
|
||||
|
||||
this->repaint();
|
||||
this->setFocus();
|
||||
if(should_set_focus)
|
||||
this->setFocus();
|
||||
}
|
||||
|
||||
bool DisassemblyWidget::AddressCanRestore(u32 start, u32 end)
|
||||
|
|
|
@ -69,7 +69,7 @@ public slots:
|
|||
void contextStubFunction();
|
||||
void contextRestoreFunction();
|
||||
|
||||
void gotoAddress(u32 address);
|
||||
void gotoAddress(u32 address, bool should_set_focus = true);
|
||||
|
||||
void setDemangle(bool demangle) { m_demangleFunctions = demangle; };
|
||||
signals:
|
||||
|
|
|
@ -115,7 +115,7 @@ public slots:
|
|||
void gotoAddress(u32 address);
|
||||
|
||||
signals:
|
||||
void gotoInDisasm(u32 address);
|
||||
void gotoInDisasm(u32 address, bool should_set_focus = true);
|
||||
void VMUpdate();
|
||||
|
||||
private:
|
||||
|
|
|
@ -57,7 +57,7 @@ public slots:
|
|||
void tabCurrentChanged(int cur);
|
||||
|
||||
signals:
|
||||
void gotoInDisasm(u32 address);
|
||||
void gotoInDisasm(u32 address, bool should_set_focus = true);
|
||||
void gotoInMemory(u32 address);
|
||||
void VMUpdate();
|
||||
|
||||
|
|
Loading…
Reference in New Issue