Debugger: Adds editing register values via double click

Double clicking a register segment will open the segment edit dialogue that normally has to be accessed by the right click menu.
This commit is contained in:
Dan McCarthy 2024-01-30 21:53:16 -06:00 committed by refractionpcsx2
parent 3695862368
commit bc7b0e53f0
2 changed files with 14 additions and 0 deletions

View File

@ -202,6 +202,19 @@ void RegisterWidget::wheelEvent(QWheelEvent* event)
this->repaint();
}
void RegisterWidget::mouseDoubleClickEvent(QMouseEvent* event)
{
if (!m_cpu->isAlive())
return;
if (m_selectedRow > m_rowEnd) // Unsigned underflow; selectedRow will be > m_rowEnd (technically negative)
return;
const int categoryIndex = ui.registerTabs->currentIndex();
if (m_cpu->getRegisterSize(categoryIndex) == 128)
contextChangeSegment();
else
contextChangeValue();
}
void RegisterWidget::customMenuRequested(QPoint pos)
{
if (!m_cpu->isAlive())

View File

@ -26,6 +26,7 @@ public:
protected:
void paintEvent(QPaintEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseDoubleClickEvent(QMouseEvent* event);
void wheelEvent(QWheelEvent* event);
public slots: