aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-06-30 21:30:17 -0300
committerJuan Linietsky2017-06-30 21:35:05 -0300
commit2a3e00c8c7e6f997b12864755a3df3b9bd3cca05 (patch)
tree807a72e686f76fcf44ecd5fb2e6834545d98b38f /editor/plugins/script_editor_plugin.cpp
parente2e73ec906d0671c870ff64eefd15dfc86abaaec (diff)
downloadgodot-2a3e00c8c7e6f997b12864755a3df3b9bd3cca05.tar.gz
godot-2a3e00c8c7e6f997b12864755a3df3b9bd3cca05.tar.zst
godot-2a3e00c8c7e6f997b12864755a3df3b9bd3cca05.zip
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 002487066..a7a3242ad 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -509,9 +509,8 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
if (p_save) {
apply_scripts();
}
- if (current->get_edit_menu()) {
- memdelete(current->get_edit_menu());
- }
+ current->clear_edit_menu();
+
} else {
EditorHelp *help = tab_container->get_child(selected)->cast_to<EditorHelp>();
_add_recent_script(help->get_class());
@@ -2180,13 +2179,15 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_list = memnew(ItemList);
list_split->add_child(script_list);
- script_list->set_custom_minimum_size(Size2(0, 0));
+ script_list->set_custom_minimum_size(Size2(150 * EDSCALE, 100)); //need to give a bit of limit to avoid it from disappearing
+ script_list->set_v_size_flags(SIZE_EXPAND_FILL);
script_split->set_split_offset(140);
- list_split->set_split_offset(500);
+ //list_split->set_split_offset(500);
members_overview = memnew(ItemList);
list_split->add_child(members_overview);
- members_overview->set_custom_minimum_size(Size2(0, 0));
+ members_overview->set_custom_minimum_size(Size2(0, 100)); //need to give a bit of limit to avoid it from disappearing
+ members_overview->set_v_size_flags(SIZE_EXPAND_FILL);
tab_container = memnew(TabContainer);
tab_container->add_style_override("panel", p_editor->get_gui_base()->get_stylebox("ScriptPanel", "EditorStyles"));