Browse Source

Show in tabs non default class icons

(cherry picked from commit 825a870f06be1603f872ee8bf1989b63d806948f)
qarmin 6 năm trước cách đây
mục cha
commit
ae3047d758
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      editor/editor_node.cpp

+ 3 - 3
editor/editor_node.cpp

@@ -136,10 +136,10 @@ void EditorNode::_update_scene_tabs() {
 	Ref<Texture> script_icon = gui_base->get_icon("Script", "EditorIcons");
 	for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
 
-		String type = editor_data.get_scene_type(i);
+		Node *type_node = editor_data.get_edited_scene_root(i);
 		Ref<Texture> icon;
-		if (type != String()) {
-			icon = get_class_icon(type, "Node");
+		if (type_node) {
+			icon = EditorNode::get_singleton()->get_object_icon(type_node, "Node");
 		}
 
 		int current = editor_data.get_edited_scene();