Merge pull request #31387 from Daw11/assets-image-autoselect

Automatically select the first image of the assets page
This commit is contained in:
Rémi Verschelde 2019-08-15 18:16:55 +02:00 committed by GitHub
commit 983e348fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,10 +270,10 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
if (!p_video) {
preview.image = get_icon("ThumbnailWait", "EditorIcons");
}
if (preview_images.size() == 0 && !p_video) {
preview_images.push_back(preview);
if (preview_images.size() == 1 && !p_video) {
_preview_click(p_id);
}
preview_images.push_back(preview);
}
EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {