Fix #109198: Enum properties don't display text in Dope Sheet sliders #109205

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:109198 into main 2023-06-27 15:32:59 +02:00

1 Commits

Author SHA1 Message Date
9ab443ae58 Fix #109198: Enum properties don't display text in Dope Sheet sliders
`uiDefAutoButR` (or actually `uiDefButR_prop` > `ui_def_but_rna` later
down the line) has this behavior when "" string is passed in, it will
not display text on or next to the button.
This is of course desired in most scenarios -- it might even be desired
for non-icon enums in certain cases (though this is already a bit harder
to find cases for), so changing behavior in said functions is probably
not what we want.

The behavior - from the dopsheet sliders - would seem like a bug though.

Passing NULL (instead of "") to `uiDefAutoButR` results in properly
displaying the chosen item on the dropdown for enums, but for other
property types it would then show the property ui name alongside the
button (which is not what we want in the dopsheet, UI names are already
drawn there separately).

So now, pass "" or NULL conditionally (depending on property type
`PROP_ENUM`).
2023-06-27 15:18:38 +02:00