From 5d56efcaa4ccb20d0248f0e6950b04e69c70c95f Mon Sep 17 00:00:00 2001 From: ConteZero Date: Sun, 19 Jun 2022 16:55:13 +0200 Subject: Add an option to drag'n'drop selected text in TextEdit --- editor/code_editor.cpp | 1 + editor/editor_settings.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'editor') 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 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") -- cgit v1.2.3