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.
This commit is contained in:
@ -713,6 +713,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
|
||||
drag->add_child(tr);
|
||||
Label *label = memnew(Label);
|
||||
label->set_text(presets->get_item_text(pos));
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // Don't translate user input.
|
||||
drag->add_child(label);
|
||||
|
||||
presets->set_drag_preview(drag);
|
||||
|
||||
Reference in New Issue
Block a user