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:
Julian Eisel
2023-08-10 17:10:21 +02:00
parent dce2368b8c
commit ff636ed092

View File

@@ -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);
}