diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2015-12-14 14:16:29 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2015-12-14 14:16:29 +0100 |
commit | d558ced434dffe3db7240c28afe8ad3afb15ea11 (patch) | |
tree | 46fe42a017934e0c776c9b229dc58b50bc824c1e | |
parent | 7155f75e2224543e036aeed8fa247ef1b96af7e4 (diff) |
Editor layout dialog: name field grabs focus on popup
-rw-r--r-- | tools/editor/editor_layout_dialog.cpp | 8 | ||||
-rw-r--r-- | tools/editor/editor_layout_dialog.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/editor/editor_layout_dialog.cpp b/tools/editor/editor_layout_dialog.cpp index e37f263c0c..d3a60f90dd 100644 --- a/tools/editor/editor_layout_dialog.cpp +++ b/tools/editor/editor_layout_dialog.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* editor_node.cpp */ +/* editor_layout_dialog.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -35,6 +35,12 @@ void EditorLayoutDialog::clear_layout_name() { layout_name->clear(); } +void EditorLayoutDialog::_post_popup() { + + ConfirmationDialog::_post_popup(); + layout_name->grab_focus(); +} + void EditorLayoutDialog::ok_pressed() { if (layout_name->get_text()!="") { diff --git a/tools/editor/editor_layout_dialog.h b/tools/editor/editor_layout_dialog.h index 7e3b9e3d8a..be9644f8ae 100644 --- a/tools/editor/editor_layout_dialog.h +++ b/tools/editor/editor_layout_dialog.h @@ -43,6 +43,7 @@ protected: static void _bind_methods(); virtual void ok_pressed(); + virtual void _post_popup(); public: void clear_layout_name(); |