summaryrefslogtreecommitdiffstats
path: root/src/ui/key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/key.cpp')
-rw-r--r--src/ui/key.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ui/key.cpp b/src/ui/key.cpp
index de668bc..0cf74bc 100644
--- a/src/ui/key.cpp
+++ b/src/ui/key.cpp
@@ -59,12 +59,8 @@ CKey::~CKey()
bool CKey::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg)
{
char name[100];
- Event event;
-
- if (eventMsg == EVENT_NULL) {
- m_event->GetEvent(event);
- eventMsg = event.type;
- }
+ if (eventMsg == EVENT_NULL)
+ eventMsg = GetUniqueEventType();
CControl::Create(pos, dim, icon, eventMsg);
GetResource(RES_EVENT, eventMsg, name);