summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorConteZero <one@contezero.com>2022-06-19 16:55:13 +0200
committerConteZero <one@contezero.com>2022-06-26 15:22:02 +0200
commit5d56efcaa4ccb20d0248f0e6950b04e69c70c95f (patch)
tree32cae21d2ccc2e2740edccc8bf397c2309b24ddd /editor
parent747ff071cd68f3411b49f8af5590575aaf9f7218 (diff)
Add an option to drag'n'drop selected text in TextEdit
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp1
-rw-r--r--editor/editor_settings.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 7c00cf351c..272de725c8 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1024,6 +1024,7 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_scroll_past_end_of_file_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/scroll_past_end_of_file"));
text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/smooth_scrolling"));
text_editor->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/v_scroll_speed"));
+ text_editor->set_drag_and_drop_selection_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/drag_and_drop_selection"));
// Behavior: indent
text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/behavior/indent/type"));
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index db9193db06..ad9c547693 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -542,6 +542,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/behavior/navigation/scroll_past_end_of_file", false);
_initial_set("text_editor/behavior/navigation/smooth_scrolling", true);
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/behavior/navigation/v_scroll_speed", 80, "1,10000,1")
+ _initial_set("text_editor/behavior/navigation/drag_and_drop_selection", true);
// Behavior: Indent
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/behavior/indent/type", 0, "Tabs,Spaces")