Преглед на файлове

Asset Library: Scroll up the ScrollContainer after page load

Marcus Brummer преди 4 години
родител
ревизия
0e4f2ca860
променени са 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);
 					_request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0);
 				}
 				}
 			}
 			}
+
+			if (!result.empty()) {
+				library_scroll->set_v_scroll(0);
+			}
 		} break;
 		} break;
 		case REQUESTING_ASSET: {
 		case REQUESTING_ASSET: {
 			Dictionary r = d;
 			Dictionary r = d;