summaryrefslogtreecommitdiffstats
path: root/modules/gridmap/grid_map_editor_plugin.cpp
diff options
context:
space:
mode:
authorLisapple <lisacintosh@gmail.com>2019-05-08 17:42:08 +0200
committerLisapple <lisacintosh@gmail.com>2019-05-08 17:42:08 +0200
commit77278f6bac2de491fc6e6f143a8830db70e8b72c (patch)
tree7e1a2824900c9c76bea03a25be57de27e08d9b52 /modules/gridmap/grid_map_editor_plugin.cpp
parentb0931806c2a085e84ecc4d7989436edc83cd70a8 (diff)
downloadredot-engine-77278f6bac2de491fc6e6f143a8830db70e8b72c.tar.gz
Release GridMap floor field focus when mouse exited
Diffstat (limited to 'modules/gridmap/grid_map_editor_plugin.cpp')
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 657aa1f9ce..890bd730f7 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -1179,6 +1179,10 @@ void GridMapEditor::_floor_changed(float p_value) {
_update_selection_transform();
}
+void GridMapEditor::_floor_mouse_exited() {
+ floor->get_line_edit()->release_focus();
+}
+
void GridMapEditor::_bind_methods() {
ClassDB::bind_method("_text_changed", &GridMapEditor::_text_changed);
@@ -1188,6 +1192,7 @@ void GridMapEditor::_bind_methods() {
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
ClassDB::bind_method("_item_selected_cbk", &GridMapEditor::_item_selected_cbk);
ClassDB::bind_method("_floor_changed", &GridMapEditor::_floor_changed);
+ ClassDB::bind_method("_floor_mouse_exited", &GridMapEditor::_floor_mouse_exited);
ClassDB::bind_method("_set_selection", &GridMapEditor::_set_selection);
ClassDB::bind_method(D_METHOD("_set_display_mode", "mode"), &GridMapEditor::_set_display_mode);
@@ -1221,6 +1226,8 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
spatial_editor_hb->add_child(floor);
floor->connect("value_changed", this, "_floor_changed");
+ floor->connect("mouse_exited", this, "_floor_mouse_exited");
+ floor->get_line_edit()->connect("mouse_exited", this, "_floor_mouse_exited");
spatial_editor_hb->add_child(memnew(VSeparator));