File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Assets/Editor Toolbox/Editor/Internal Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ private void ValidateElementsRects(int arraySize)
55
55
}
56
56
}
57
57
58
- private void DrawEmptyList ( Rect middleRect )
58
+ private void DrawEmptyList ( Rect middleRect , bool showEmptyLabel )
59
59
{
60
60
using ( var emptyListGroup = new EditorGUILayout . VerticalScope ( Style . contentGroupStyle ) )
61
61
{
@@ -65,9 +65,12 @@ private void DrawEmptyList(Rect middleRect)
65
65
}
66
66
else
67
67
{
68
- var height = EditorGUIUtility . singleLineHeight ;
69
- var rect = EditorGUILayout . GetControlRect ( GUILayout . Height ( height ) ) ;
70
- EditorGUI . LabelField ( rect , Style . emptyOrInvalidListContent ) ;
68
+ var height = Style . minEmptyHeight ;
69
+ EditorGUILayout . GetControlRect ( GUILayout . Height ( height ) ) ;
70
+ if ( showEmptyLabel )
71
+ {
72
+ EditorGUILayout . LabelField ( Style . emptyOrInvalidListContent ) ;
73
+ }
71
74
}
72
75
}
73
76
}
@@ -233,9 +236,15 @@ protected override void DoListMiddle(Rect middleRect)
233
236
//make sure rects array is valid
234
237
ValidateElementsRects ( arraySize ) ;
235
238
//handle empty or invalid array
236
- if ( ! IsPropertyValid || ! IsExpanded || IsEmpty )
239
+ if ( ! IsPropertyValid || ! IsExpanded )
240
+ {
241
+ DrawEmptyList ( middleRect , false ) ;
242
+ return ;
243
+ }
244
+
245
+ if ( IsEmpty )
237
246
{
238
- DrawEmptyList ( middleRect ) ;
247
+ DrawEmptyList ( middleRect , true ) ;
239
248
return ;
240
249
}
241
250
You can’t perform that action at this time.
0 commit comments