UI: Allow passing empty string to templateID to ensure no label
This caused confusion when Bastien passed an empty string to the ID template, expecting that it would ensure no default label is placed, but it caused the layout to be split. This is because we'd still add an empty label in this case.
This commit is contained in:
@@ -1312,7 +1312,7 @@ static void template_ID(const bContext *C,
|
||||
type = idptr.type;
|
||||
}
|
||||
|
||||
if (text) {
|
||||
if (text && text[0]) {
|
||||
/* Add label respecting the separated layout property split state. */
|
||||
uiItemL_respect_property_split(layout, text, ICON_NONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user