Fix editbox default text being pre-selected in some cases
authorMetaDucky <metaducky AT gmail DOT com>
Mon, 27 May 2013 17:33:33 +0000 (19:33 +0200)
committerKahrl <kahrl@gmx.net>
Fri, 31 May 2013 23:59:48 +0000 (01:59 +0200)
src/guiCreateWorld.cpp
src/guiFormSpecMenu.cpp
src/guiTextInputMenu.cpp

index 9fc764214fe2d868e13ff8a66210eb8768966b14..f9afe959202c2674b55814c536aea7e1a3e4168c 100644 (file)
@@ -135,6 +135,9 @@ void GUICreateWorld::regenerateGui(v2u32 screensize)
                evt.EventType = EET_KEY_INPUT_EVENT;
                evt.KeyInput.Key = KEY_END;
                evt.KeyInput.PressedDown = true;
+               evt.KeyInput.Char = 0;
+               evt.KeyInput.Control = 0;
+               evt.KeyInput.Shift = 0;
                e->OnEvent(evt);
        }
        {
index 6ada77698d2acd38f5a4dd3d43cab14a02bc3a60..3e0d7fd46710f2fa2b20a6145ba412f189664f9b 100644 (file)
@@ -418,9 +418,12 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
                                        e->setTextAlignment(gui::EGUIA_UPPERLEFT, gui::EGUIA_UPPERLEFT);
                                } else {
                                        irr::SEvent evt;
-                                       evt.KeyInput.Key = KEY_END;
                                        evt.EventType = EET_KEY_INPUT_EVENT;
+                                       evt.KeyInput.Key = KEY_END;
                                        evt.KeyInput.PressedDown = true;
+                                       evt.KeyInput.Char = 0;
+                                       evt.KeyInput.Control = 0;
+                                       evt.KeyInput.Shift = 0;
                                        e->OnEvent(evt);
                                }
 
index c15eeedc5fae607c4463351c985c377fdcd48237..d5229f4157fb1760de885dd2834bbc8717607261 100644 (file)
@@ -121,6 +121,9 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
                evt.EventType = EET_KEY_INPUT_EVENT;
                evt.KeyInput.Key = KEY_END;
                evt.KeyInput.PressedDown = true;
+               evt.KeyInput.Char = 0;
+               evt.KeyInput.Control = 0;
+               evt.KeyInput.Shift = 0;
                e->OnEvent(evt);
        }
        changeCtype("");