Allows setBitmap calls on IconButtons to set the bitmap data even if the control isn't awake to avoid issues of a set call being 'skipped'

This commit is contained in:
JeffR 2026-01-07 17:57:53 -06:00
parent d95f5f798e
commit 322d3bb093

View file

@ -202,11 +202,10 @@ bool GuiIconButtonCtrl::resize(const Point2I &newPosition, const Point2I &newExt
void GuiIconButtonCtrl::setBitmap(const char *name) void GuiIconButtonCtrl::setBitmap(const char *name)
{ {
_setBitmap(name);
if(!isAwake()) if(!isAwake())
return; return;
_setBitmap(name);
// So that extent is recalculated if autoSize is set. // So that extent is recalculated if autoSize is set.
resize( getPosition(), getExtent() ); resize( getPosition(), getExtent() );