mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 06:16:54 +00:00
Image Extentions - Return early in 'CalculateImageSize' when only one or less images are present
This commit is contained in:
@@ -88,9 +88,9 @@ namespace PckStudio.Extensions
|
||||
|
||||
private static Size CalculateImageSize(IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
if (sources.Count == 0)
|
||||
if (sources.Count < 2)
|
||||
{
|
||||
return Size.Empty;
|
||||
return sources.Count < 1 ? Size.Empty : sources[0].Size;
|
||||
}
|
||||
var horizontal = layoutDirection == ImageLayoutDirection.Horizontal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user