diff --git a/src/game/editor/prompt.cpp b/src/game/editor/prompt.cpp index 4e08852c1..a72db4671 100644 --- a/src/game/editor/prompt.cpp +++ b/src/game/editor/prompt.cpp @@ -101,7 +101,7 @@ void CPrompt::OnRender(CUIRect _) { m_PromptSelectedIndex = 0; m_vpFilteredPromptList.clear(); - if(m_ResetFilterResults && m_pLastAction) + if(m_ResetFilterResults && m_pLastAction && !m_pLastAction->Disabled()) { m_vpFilteredPromptList.push_back(m_pLastAction); } @@ -160,7 +160,7 @@ void CPrompt::OnRender(CUIRect _) { if(m_PromptSelectedIndex >= 0) { - const CQuickAction *pBtn = m_vpFilteredPromptList[m_PromptSelectedIndex]; + CQuickAction *pBtn = m_vpFilteredPromptList[m_PromptSelectedIndex]; SetInactive(); pBtn->Call(); m_pLastAction = pBtn; diff --git a/src/game/editor/prompt.h b/src/game/editor/prompt.h index 4b616ec98..2d873e580 100644 --- a/src/game/editor/prompt.h +++ b/src/game/editor/prompt.h @@ -10,10 +10,10 @@ class CPrompt : public CEditorComponent { bool m_ResetFilterResults = true; - const CQuickAction *m_pLastAction = nullptr; + CQuickAction *m_pLastAction = nullptr; int m_PromptSelectedIndex = -1; - std::vector m_vpFilteredPromptList; + std::vector m_vpFilteredPromptList; std::vector m_vQuickActions; CLineInputBuffered<512> m_PromptInput;