From e415e9c042cd56e0b75f7684582c5550d6759a99 Mon Sep 17 00:00:00 2001 From: CLARATION Date: Fri, 26 Jun 2026 21:03:54 -0700 Subject: [PATCH] fix(gui): reset sequence index after entering dfu --- src/wx/DfuPanel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wx/DfuPanel.cpp b/src/wx/DfuPanel.cpp index 45fd353..51dc5e4 100644 --- a/src/wx/DfuPanel.cpp +++ b/src/wx/DfuPanel.cpp @@ -106,6 +106,19 @@ void DfuPanel::SetDeviceState(const DeviceState& state) m_isEnteringDfu = false; m_headerText->SetLabel("Device entered DFU mode successfully.\n"); + m_index = m_sequence.steps.size(); + m_stepRemaining = -1; + m_actionExecutedIndex = -1; + + const wxColour kInactive = + wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + + for (auto* lbl : m_stepLabels) + lbl->SetForegroundColour(kInactive); + + for (auto* lbl : m_buttonLabels) + lbl->SetForegroundColour(kInactive); + if (!m_stagnentTimer.IsRunning()) m_stagnentTimer.StartOnce(3000); }