Fix code widget not becoming visible when selecting 'view code' or similar

This affected the memory and registers widgets (and possibly others). I'm pretty sure it regressed in 5f629abd8b.

The SetCodeVisible line is a new fix, but the equivalent already existed in the memory widget.
This commit is contained in:
Pokechu22 2022-12-01 16:43:41 -08:00
parent 4f4bd57fe9
commit 0ccfa31ec8

View File

@ -291,8 +291,10 @@ void CodeWidget::SetAddress(u32 address, CodeViewWidget::SetAddressUpdate update
{
m_code_view->SetAddress(address, update);
if (update == CodeViewWidget::SetAddressUpdate::WithUpdate)
if (update == CodeViewWidget::SetAddressUpdate::WithUpdate ||
update == CodeViewWidget::SetAddressUpdate::WithDetailedUpdate)
{
Settings::Instance().SetCodeVisible(true);
raise();
m_code_view->setFocus();
}