Limit code editor minimum width, clear Scene node subresource menu before refilling it
This commit is contained in:
parent
1eb1837d0c
commit
69ef89a8bd
@ -2613,8 +2613,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
tab_container = memnew(TabContainer);
|
tab_container = memnew(TabContainer);
|
||||||
tab_container->set_tabs_visible(false);
|
tab_container->set_tabs_visible(false);
|
||||||
|
tab_container->set_custom_minimum_size(Size2(200 * EDSCALE, 0));
|
||||||
script_split->add_child(tab_container);
|
script_split->add_child(tab_container);
|
||||||
|
|
||||||
tab_container->set_h_size_flags(SIZE_EXPAND_FILL);
|
tab_container->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
ED_SHORTCUT("script_editor/window_sort", TTR("Sort"));
|
ED_SHORTCUT("script_editor/window_sort", TTR("Sort"));
|
||||||
|
@ -1699,7 +1699,7 @@ void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {
|
|||||||
icon = get_icon("Object", "EditorIcons");
|
icon = get_icon("Object", "EditorIcons");
|
||||||
|
|
||||||
if (menu->get_item_count() == 0) {
|
if (menu->get_item_count() == 0) {
|
||||||
menu->add_submenu_item(TTR("Sub-Resources:"), "Sub-Resources");
|
menu->add_submenu_item(TTR("Sub-Resources"), "Sub-Resources");
|
||||||
}
|
}
|
||||||
int index = menu_subresources->get_item_count();
|
int index = menu_subresources->get_item_count();
|
||||||
menu_subresources->add_icon_item(icon, E->get().name.capitalize(), EDIT_SUBRESOURCE_BASE + subresources.size());
|
menu_subresources->add_icon_item(icon, E->get().name.capitalize(), EDIT_SUBRESOURCE_BASE + subresources.size());
|
||||||
@ -1733,6 +1733,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
|
|||||||
if (selection.size() == 1) {
|
if (selection.size() == 1) {
|
||||||
|
|
||||||
subresources.clear();
|
subresources.clear();
|
||||||
|
menu_subresources->clear();
|
||||||
_add_children_to_popup(selection.front()->get(), 0);
|
_add_children_to_popup(selection.front()->get(), 0);
|
||||||
if (menu->get_item_count() > 0)
|
if (menu->get_item_count() > 0)
|
||||||
menu->add_separator();
|
menu->add_separator();
|
||||||
|
Loading…
Reference in New Issue
Block a user