MemoryViewWidget: Reduce amount of unnecessary update calls.

This commit is contained in:
TryTwo 2024-06-24 14:21:31 -07:00
parent 9fc417b1d0
commit 965be2ab89
2 changed files with 3 additions and 4 deletions

View File

@ -99,7 +99,9 @@ public:
void resizeEvent(QResizeEvent* event) override
{
QTableWidget::resizeEvent(event);
m_view->CreateTable();
// Remakes table if vertically resized
const int rows = std::round((height() / static_cast<float>(rowHeight(0))) - 0.25);
if (rows != rowCount())
m_view->UpdateDisbatcher(MemoryViewWidget::UpdateType::Full);
}

View File

@ -66,9 +66,6 @@ MemoryWidget::MemoryWidget(Core::System& system, QWidget* parent)
connect(&Settings::Instance(), &Settings::DebugModeToggled, this,
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsMemoryVisible()); });
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &MemoryWidget::Update);
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, &MemoryWidget::Update);
LoadSettings();
ConnectWidgets();