From d4b145a8ee201d25e5259aba29b65b84bb444b3a Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 8 Sep 2010 02:27:48 +0200 Subject: [PATCH] fixed Gui lock while deleting/reading demos. Closes #167 --- src/game/client/components/menus_demo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 6c5dcbe4c..2880da25d 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -546,6 +546,11 @@ void CMenus::RenderDemoList(CUIRect MainView) const char *pError = Client()->DemoPlayer_Play(m_lDemos[s_SelectedItem].m_aFilename); if(pError) PopupMessage(Localize("Error"), str_comp(pError, "error loading demo") ? pError : Localize("error loading demo"), Localize("Ok")); + else + { + UI()->SetActiveItem(0); + return; + } } } } @@ -556,7 +561,10 @@ void CMenus::RenderDemoList(CUIRect MainView) if(DoButton_Menu(&s_DeleteButton, Localize("Delete"), 0, &DeleteRect) || m_DeletePressed) { if(s_SelectedItem >= 0 && s_SelectedItem < m_lDemos.size()) + { + UI()->SetActiveItem(0); m_Popup = POPUP_DELETE_DEMO; + } } } }