From 18660b242874d2b13298d5027c54585feb2addaf Mon Sep 17 00:00:00 2001 From: XTigerHyperX Date: Sat, 10 Oct 2020 20:55:15 +0100 Subject: [PATCH] smol description error fix --- FModel/Creator/Texts/Text.cs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/FModel/Creator/Texts/Text.cs b/FModel/Creator/Texts/Text.cs index 32003a9a..1e9502b1 100644 --- a/FModel/Creator/Texts/Text.cs +++ b/FModel/Creator/Texts/Text.cs @@ -230,20 +230,23 @@ namespace FModel.Creator.Texts _BOTTOM_TEXT_SIZE = 15; string text = icon.Description; ETextSide side = ETextSide.Center; - switch ((EIconDesign)Properties.Settings.Default.AssetsIconDesign) + if (text != null) { - case EIconDesign.Mini: - { - maxLine = 5; - _BOTTOM_TEXT_SIZE = icon.Margin; - text = text.ToUpper(); - break; - } - case EIconDesign.Flat: - { - side = ETextSide.Right; - break; - } + switch ((EIconDesign)Properties.Settings.Default.AssetsIconDesign) + { + case EIconDesign.Mini: + { + maxLine = 5; + _BOTTOM_TEXT_SIZE = icon.Margin; + text = text.ToUpper(); + break; + } + case EIconDesign.Flat: + { + side = ETextSide.Right; + break; + } + } } SKPaint descriptionPaint = new SKPaint