Fixed memory leak (and incorrect behaviour of STK) when ESC

is pressed instead of 'cancel' to stop downloading an addon.
Before this the download would actually finish.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10098 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-11-03 01:54:46 +00:00
parent ef1f33f594
commit fc7d327350
2 changed files with 8 additions and 1 deletions

View File

@@ -168,6 +168,13 @@ void AddonsLoading::init()
}
}
// ----------------------------------------------------------------------------
void AddonsLoading::escapePressed()
{
processEvent("cancel");
ModalDialog::dismiss();
} // escapePressed
// ----------------------------------------------------------------------------
GUIEngine::EventPropagation

View File

@@ -32,7 +32,7 @@ class Request;
*/
class AddonsLoading : public GUIEngine::ModalDialog
{
//virtual void escapePressed() {};
virtual void escapePressed();
private:
GUIEngine::LabelWidget *m_state;
GUIEngine::ProgressBarWidget *m_progress;