Skip to content

Commit

Permalink
Merge pull request #89963 from timothyqiu/auto-translation
Browse files Browse the repository at this point in the history
Fix unexpected auto-translation of more editor components
  • Loading branch information
akien-mga committed Mar 28, 2024
2 parents af08342 + f298aaa commit 86415f0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion editor/connections_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "scene/gui/option_button.h"
#include "scene/gui/popup_menu.h"
#include "scene/gui/spin_box.h"
#include "scene/resources/packed_scene.h"

static Node *_find_first_script(Node *p_root, Node *p_node) {
if (p_node != p_root && p_node->get_owner() != p_root) {
Expand Down Expand Up @@ -1562,6 +1561,7 @@ ConnectionsDock::ConnectionsDock() {
vbc->add_child(search_box);

tree = memnew(ConnectionsDockTree);
tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_columns(1);
tree->set_select_mode(Tree::SELECT_ROW);
tree->set_hide_root(true);
Expand Down
1 change: 1 addition & 0 deletions editor/debugger/editor_debugger_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
EditorDebuggerTree::EditorDebuggerTree() {
set_v_size_flags(SIZE_EXPAND_FILL);
set_allow_rmb_select(true);
set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

// Popup
item_menu = memnew(PopupMenu);
Expand Down
2 changes: 1 addition & 1 deletion editor/group_settings_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "group_settings_editor.h"

#include "core/config/project_settings.h"
#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/filesystem_dock.h"
Expand Down Expand Up @@ -521,6 +520,7 @@ GroupSettingsEditor::GroupSettingsEditor() {
hbc->add_child(add_button);

tree = memnew(Tree);
tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_hide_root(true);
tree->set_select_mode(Tree::SELECT_SINGLE);
tree->set_allow_reselect(true);
Expand Down
2 changes: 1 addition & 1 deletion editor/gui/scene_tree_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "editor/themes/editor_scale.h"
#include "scene/gui/flow_container.h"
#include "scene/gui/label.h"
#include "scene/gui/tab_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
Expand Down Expand Up @@ -1513,6 +1512,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
}

tree = memnew(Tree);
tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_anchor(SIDE_RIGHT, ANCHOR_END);
tree->set_anchor(SIDE_BOTTOM, ANCHOR_END);
tree->set_begin(Point2(0, p_label ? 18 : 0));
Expand Down
1 change: 1 addition & 0 deletions editor/inspector_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
forward_button->connect("pressed", callable_mp(this, &InspectorDock::_edit_forward));

history_menu = memnew(MenuButton);
history_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
history_menu->set_flat(false);
history_menu->set_theme_type_variation("FlatMenuButton");
history_menu->set_tooltip_text(TTR("History of recently edited objects."));
Expand Down
11 changes: 1 addition & 10 deletions editor/plugins/animation_tree_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,15 @@
#include "animation_blend_space_2d_editor.h"
#include "animation_blend_tree_editor_plugin.h"
#include "animation_state_machine_editor.h"
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/resource_loader.h"
#include "core/math/delaunay_2d.h"
#include "core/os/keyboard.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_node.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/themes/editor_scale.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/button.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/separator.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"

void AnimationTreeEditor::edit(AnimationTree *p_tree) {
Expand Down Expand Up @@ -115,6 +105,7 @@ void AnimationTreeEditor::_update_path() {
path_hb->add_child(b);
for (int i = 0; i < button_path.size(); i++) {
b = memnew(Button);
b->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
b->set_text(button_path[i]);
b->set_toggle_mode(true);
b->set_button_group(group);
Expand Down

0 comments on commit 86415f0

Please sign in to comment.