UI: uiBut Indeterminate State #108210
|
@ -1948,6 +1948,9 @@ static void widget_draw_text(const uiFontStyle *fstyle,
|
|||
{
|
||||
STRNCPY(but->drawstr, UI_VALUE_INDETERMINATE_CHAR);
|
||||
Harley marked this conversation as resolved
|
||||
align = UI_STYLE_TEXT_CENTER;
|
||||
use_right_only = false;
|
||||
Harley marked this conversation as resolved
Outdated
Julian Eisel
commented
This doesn't have any impact, I think a This doesn't have any impact, `use_right_only` is already false at this point, and may only be set to true later. Same for `drawstr_right`.
I think a `bool drawstr_overridden` makes sense. When true we don't draw right aligned text. This could also be set when `but->editstr` is true.
|
||||
drawstr_right = nullptr;
|
||||
drawstr_left_len = strlen(but->drawstr);
|
||||
}
|
||||
|
||||
/* text button selection, cursor, composite underline */
|
||||
|
|
Loading…
Reference in New Issue
Do not modify
but->drawstr
here, the function shouldn't have such side effects. Modify the localdrawstr
instead.