Fix #123594: ICON_NONE Should be No Op
Using ICON_NONE causes textures to be referenced even though nothing is ultimately drawn. This adds an early exit for this value, and also changes the type of it from ICON_TYPE_COLOR_TEXTURE (used to display a full-color bitmap) to ICON_TYPE_MONO_TEXTURE (normal one-color type now coming from SVG). Pull Request: https://projects.blender.org/blender/blender/pulls/123609
This commit is contained in:
committed by
Harley Acheson
parent
8cfe25b90c
commit
c295c9f818
@@ -38,7 +38,7 @@
|
||||
#endif
|
||||
|
||||
/* ICON_ prefix added */
|
||||
DEF_ICON_COLOR(NONE)
|
||||
DEF_ICON(NONE)
|
||||
DEF_ICON(QUESTION)
|
||||
DEF_ICON(ERROR)
|
||||
DEF_ICON(CANCEL)
|
||||
|
||||
@@ -1853,6 +1853,10 @@ static void icon_draw_size(float x,
|
||||
const IconTextOverlay *text_overlay,
|
||||
const bool inverted = false)
|
||||
{
|
||||
if (icon_id == ICON_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
bTheme *btheme = UI_GetTheme();
|
||||
const float fdraw_size = float(draw_size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user