From 0330b0552b90e647df3ea1f2094f4517df26250d Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 2 Jan 2021 15:29:01 +0100 Subject: Cleanup: Explicitly pass icon size to generation function, not just bool * This way you don't have to look up the function declaration to know what the boolean value means. * You can call the function in a loop over the available sizes and pass the index as size. * Makes it easier to add a new size in future if needed. --- source/blender/editors/util/ed_util_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/ed_util_ops.c b/source/blender/editors/util/ed_util_ops.c index 88df20c5966..bb531b11b12 100644 --- a/source/blender/editors/util/ed_util_ops.c +++ b/source/blender/editors/util/ed_util_ops.c @@ -131,7 +131,7 @@ static int lib_id_generate_preview_exec(bContext *C, wmOperator *UNUSED(op)) if (preview) { BKE_previewimg_clear(preview); } - UI_icon_render_id(C, NULL, id, true, true); + UI_icon_render_id(C, NULL, id, ICON_SIZE_PREVIEW, true); WM_event_add_notifier(C, NC_ASSET, NULL); -- cgit v1.2.3