summaryrefslogtreecommitdiffstats
path: root/editor/action_map_editor.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2024-09-19 08:14:00 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2024-09-19 19:21:29 +0800
commit14321b8ed5e151987c0e2a0dd28d7a4e2483faba (patch)
tree9506b0a903bd48eb925506942bfddbde7a6ddb22 /editor/action_map_editor.cpp
parent694d3c2930bdfb43fd93e1e6641f66c4f19a5c77 (diff)
downloadredot-engine-14321b8ed5e151987c0e2a0dd28d7a4e2483faba.tar.gz
Set auto translate mode for drag previews
- Controls - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input. - `TabBar`: Use the same auto translate mode as the node. - `RichTextLabel`: Always disable since auto translation is done differently from other controls (selection text you get programmatically is always after auto translation). - Editor - Disable drag preview auto translation if the text is user input, filename, or class name. - Also disabled unexpected auto translation for audio bus effect names.
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r--editor/action_map_editor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 16423fb111..d648dab298 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -254,6 +254,7 @@ Variant ActionMapEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
Label *label = memnew(Label(name));
label->set_theme_type_variation("HeaderSmall");
label->set_modulate(Color(1, 1, 1, 1.0f));
+ label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
action_tree->set_drag_preview(label);
Dictionary drag_data;