diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-06-09 21:07:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-09 21:07:27 +0200 |
| commit | 58c123511167cf5679d3bcf19f66efe8dbfd4db0 (patch) | |
| tree | 7036664c66f25929bd4b580f4b730432ca3cf9a6 /editor/plugins/script_editor_plugin.cpp | |
| parent | 4f54470c2ce81c6636e5152400d5c1a08ac8bbff (diff) | |
| parent | da6aebeb4c6e36385a180644d8080ec580e3fadb (diff) | |
| download | redot-engine-58c123511167cf5679d3bcf19f66efe8dbfd4db0.tar.gz | |
Merge pull request #49265 from KoBeWi/keepfreplace_2_keepers_of_replace
Move FindReplaceBar out of CodeTextEditor
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 4b7faec228..d66217ec2d 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1640,10 +1640,13 @@ void ScriptEditor::ensure_select_current() { ScriptEditorBase *se = _get_current_editor(); if (se) { se->enable_editor(); + se->set_find_replace_bar(find_replace_bar); if (!grab_focus_block && is_visible_in_tree()) { se->ensure_focus(); } + } else { + find_replace_bar->hide(); } } @@ -3379,11 +3382,19 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { help_overview->set_custom_minimum_size(Size2(0, 60) * EDSCALE); //need to give a bit of limit to avoid it from disappearing help_overview->set_v_size_flags(SIZE_EXPAND_FILL); + VBoxContainer *code_editor_container = memnew(VBoxContainer); + script_split->add_child(code_editor_container); + tab_container = memnew(TabContainer); tab_container->set_tabs_visible(false); tab_container->set_custom_minimum_size(Size2(200, 0) * EDSCALE); - script_split->add_child(tab_container); + code_editor_container->add_child(tab_container); tab_container->set_h_size_flags(SIZE_EXPAND_FILL); + tab_container->set_v_size_flags(SIZE_EXPAND_FILL); + + find_replace_bar = memnew(FindReplaceBar); + code_editor_container->add_child(find_replace_bar); + find_replace_bar->hide(); ED_SHORTCUT("script_editor/window_sort", TTR("Sort")); ED_SHORTCUT("script_editor/window_move_up", TTR("Move Up"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_UP); |
