summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZae <zaevi@live.com>2022-11-24 18:52:15 +0800
committerZae <zaevi@live.com>2022-11-24 18:52:15 +0800
commit4fdfc5176c0ee0c55b7ed88aaaeda143efe4a3cb (patch)
tree8a6b92c1e23c6799a7704611a3db63ff4fdfc56c
parentfa270c2456df5ad12f51584c4ff891e2cf728cec (diff)
[Editor] Fix float dock shows untranslated title.
-rw-r--r--editor/editor_node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f277bf6467..995cfb138c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -4437,6 +4437,7 @@ void EditorNode::_dock_floating_close_request(Control *p_control) {
dock_slot[window_slot]->add_child(p_control);
dock_slot[window_slot]->move_child(p_control, MIN((int)window->get_meta("dock_index"), dock_slot[window_slot]->get_tab_count()));
dock_slot[window_slot]->set_current_tab(window->get_meta("dock_index"));
+ dock_slot[window_slot]->set_tab_title(dock_slot[window_slot]->get_tab_idx_from_control(p_control), TTRGET(p_control->get_name()));
window->queue_free();
@@ -4460,7 +4461,7 @@ void EditorNode::_dock_make_float() {
dock_slot[dock_popup_selected_idx]->remove_child(dock);
Window *window = memnew(Window);
- window->set_title(dock->get_name());
+ window->set_title(TTRGET(dock->get_name()));
Panel *p = memnew(Panel);
p->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("PanelForeground"), SNAME("EditorStyles")));
p->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);