UI: Fix T54691: Vector icon vs Widget base ordering.

It was making keyframe marker and bone theme color icon disappear under
their button.
This commit is contained in:
Clément Foucault 2018-04-17 15:53:49 +02:00
parent b229c879c1
commit d442e0ad63
Notes: blender-bot 2023-02-14 06:00:38 +01:00
Referenced by issue #54691, Display of OpenGL-generated icons broken after widget base batching changes
1 changed files with 2 additions and 0 deletions

View File

@ -1211,6 +1211,8 @@ static void icon_draw_size(
h = (int)(fdraw_size / aspect + 0.5f);
if (di->type == ICON_TYPE_VECTOR) {
/* We need to flush widget base first to ensure correct ordering. */
UI_widgetbase_draw_cache_flush();
/* vector icons use the uiBlock transformation, they are not drawn
* with untransformed coordinates like the other icons */
di->data.vector.func((int)x, (int)y, w, h, 1.0f);