Fixed onEscapePressed event in addons loading screen.
It actually was unused previously. I'm also not sure why there was assert(false) ?
This commit is contained in:
parent
ad870c37f4
commit
8711955bdc
@ -190,11 +190,12 @@ void AddonsLoading::init()
|
||||
} // init
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void AddonsLoading::escapePressed()
|
||||
bool AddonsLoading::onEscapePressed()
|
||||
{
|
||||
stopDownload();
|
||||
ModalDialog::dismiss();
|
||||
} // escapePressed
|
||||
return true;
|
||||
} // onEscapePressed
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -335,7 +336,6 @@ void AddonsLoading::stopDownload()
|
||||
// order to avoid a memory leak, we let network_http free
|
||||
// the request.
|
||||
//m_download_request->setManageMemory(true);
|
||||
assert(false);
|
||||
m_download_request->cancel();
|
||||
};
|
||||
} // startDownload
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "addons/addons_manager.hpp"
|
||||
#include "guiengine/widgets.hpp"
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "utils/cpp2011.hpp"
|
||||
#include "utils/synchronised.hpp"
|
||||
|
||||
namespace Online { class HTTPRequest; }
|
||||
@ -32,7 +33,6 @@ namespace Online { class HTTPRequest; }
|
||||
*/
|
||||
class AddonsLoading : public GUIEngine::ModalDialog
|
||||
{
|
||||
virtual void escapePressed();
|
||||
private:
|
||||
GUIEngine::LabelWidget *m_state;
|
||||
GUIEngine::ProgressBarWidget *m_progress;
|
||||
@ -70,6 +70,7 @@ public:
|
||||
* */
|
||||
void onUpdate(float delta);
|
||||
void voteClicked();
|
||||
virtual bool onEscapePressed() OVERRIDE;
|
||||
|
||||
}; // AddonsLoading
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user