diff --git a/mlapptools.m b/mlapptools.m index c2b7811..2afd2c5 100644 --- a/mlapptools.m +++ b/mlapptools.m @@ -124,7 +124,7 @@ function fontWeight(uiElement, weight) warnState = mlapptools.toggleWarnings('off'); widgetID = WidgetID('data-test-id', char(struct(uiElement).NodeId)); warning(warnState); % Restore warning state - case 'uipanel' + case {'uipanel','figure'} widgetID = WidgetID('data-tag', mlapptools.getDataTag(uiElement)); otherwise % default: widgetID = mlapptools.getWidgetID(win, mlapptools.getDataTag(uiElement));