From 5bae3693bfcd856507a85fded3c23515e4e633c1 Mon Sep 17 00:00:00 2001 From: Guilherme Felipe Date: Sun, 10 Jun 2018 19:10:32 -0300 Subject: Fix "find and replace" initializing with wrong size Fix the code editor outside the allowed limits. --- editor/code_editor.cpp | 2 +- editor/plugins/script_editor_plugin.h | 4 ++-- editor/plugins/script_text_editor.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 665ce7658f..906cc219de 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -95,7 +95,7 @@ void FindReplaceBar::_notification(int p_what) { set_process_unhandled_input(is_visible_in_tree()); if (is_visible_in_tree()) { - call_deferred("_update_size"); + _update_size(); } } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 769612bdb6..2fb1758ac2 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -72,9 +72,9 @@ public: class ScriptEditorDebugger; -class ScriptEditorBase : public Control { +class ScriptEditorBase : public VBoxContainer { - GDCLASS(ScriptEditorBase, Control); + GDCLASS(ScriptEditorBase, VBoxContainer); protected: static void _bind_methods(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 45f5e667fa..08e0ad95b0 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1609,6 +1609,7 @@ ScriptTextEditor::ScriptTextEditor() { code_editor->set_code_complete_func(_code_complete_scripts, this); code_editor->get_text_edit()->connect("breakpoint_toggled", this, "_breakpoint_toggled"); code_editor->get_text_edit()->connect("symbol_lookup", this, "_lookup_symbol"); + code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); update_settings(); -- cgit v1.2.3