Add warning when trying to open a dialog while the previous one is still visible
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12381 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ec48b69f9d
commit
bf62dfa7de
@ -23,6 +23,7 @@
|
||||
#include "guiengine/widget.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "utils/log.hpp"
|
||||
|
||||
#include <IGUIEnvironment.h>
|
||||
|
||||
@ -119,7 +120,11 @@ void ModalDialog::doInit(const float percentWidth, const float percentHeight)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
if (modalWindow != NULL) delete modalWindow;
|
||||
if (modalWindow != NULL)
|
||||
{
|
||||
delete modalWindow;
|
||||
Log::warn("GUIEngine", "Showing a modal dialog while the previous one is still open. Destroying the previous dialog.");
|
||||
}
|
||||
modalWindow = this;
|
||||
|
||||
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow(m_area, true /* modal */);
|
||||
|
Loading…
Reference in New Issue
Block a user