浏览代码

Merge pull request #44223 from mbrlabs/assetlib-scroll-up

Asset Library: Scroll up the ScrollContainer after page load
Rémi Verschelde 4 年之前
父节点
当前提交
d0f1c03b4f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      editor/plugins/asset_library_editor_plugin.cpp

+ 4 - 0
editor/plugins/asset_library_editor_plugin.cpp

@@ -1187,6 +1187,10 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
 					_request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0);
 				}
 			}
+
+			if (!result.empty()) {
+				library_scroll->set_v_scroll(0);
+			}
 		} break;
 		case REQUESTING_ASSET: {
 			Dictionary r = d;