Skip to content

Commit

Permalink
Qt/WatchWidget: Don't update if not paused.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiralCurtiss committed Mar 7, 2023
1 parent 0461fae commit f51ba6e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Source/Core/DolphinQt/Debugger/WatchWidget.cpp
Expand Up @@ -146,12 +146,15 @@ void WatchWidget::Update()

m_updating = true;

m_table->clear();

int size = static_cast<int>(PowerPC::debug_interface.GetWatches().size());

m_table->setRowCount(size + 1);
if (Core::GetState() != Core::State::Paused)
{
m_table->setDisabled(true);
m_updating = false;
return;
}

m_table->setDisabled(false);
m_table->clear();
m_table->setHorizontalHeaderLabels(
{tr("Label"), tr("Address"), tr("Hexadecimal"),
// i18n: The base 10 numeral system. Not related to non-integer numbers
Expand All @@ -163,6 +166,10 @@ void WatchWidget::Update()

Core::CPUThreadGuard guard;

int size = static_cast<int>(PowerPC::debug_interface.GetWatches().size());

m_table->setRowCount(size + 1);

for (int i = 0; i < size; i++)
{
const auto& entry = PowerPC::debug_interface.GetWatch(i);
Expand Down

0 comments on commit f51ba6e

Please sign in to comment.