UI: uiBut Indeterminate State #108210
|
@ -3797,6 +3797,10 @@ static void ui_but_update_ex(uiBut *but, const bool validate)
|
|||
}
|
||||
}
|
||||
Harley marked this conversation as resolved
Outdated
|
||||
|
||||
if (but->drawflag & UI_BUT_INDETERMINATE) {
|
||||
Harley marked this conversation as resolved
Outdated
Julian Eisel
commented
I'd rather avoid flags that silently change other flags. Why exactly is this needed? I'd rather avoid flags that silently change other flags. Why exactly is this needed?
|
||||
but->drawflag &= ~(UI_BUT_TEXT_LEFT | UI_BUT_TEXT_RIGHT);
|
||||
}
|
||||
|
||||
/* test for min and max, icon sliders, etc */
|
||||
Harley marked this conversation as resolved
Outdated
Julian Eisel
commented
These comments only explain what it does which is obvious from the code. But why does it do this? And for which button types? These comments only explain what it does which is obvious from the code. But why does it do this? And for which button types?
|
||||
switch (but->type) {
|
||||
case UI_BTYPE_NUM:
|
||||
|
|
Loading…
Reference in New Issue
I still can't see an explanation on why this is done, only what it does. Testing the patch, when I simply enable
UI_BUT_INDETERMINATE
for all buttons, I get a whole bunch of interaction issues/glitches. That is becauseUI_SELECT
is supposed to impact the behavior, not just the drawing.I guess this should only affect drawing (it's controlled by a draw flag after all), so this should probably be done in
ui_draw_but()
. At the end of that we already do similar things to safely manipulate flags for drawing.