Skip to content
Snippets Groups Projects
Commit bb62f107 authored by Paul Golter's avatar Paul Golter Committed by Campbell Barton
Browse files

Fix T95323: Icon-Viewer Type Error in invoke_props_dialog()

Latest builds of Blender require WindowManager.invoke_props_dialog() to
use int explicitly in width= argument. Otherwise a TypeError will be
thrown.

Ref D14031
parent 7476c1ac
No related branches found
No related tags found
No related merge requests found
......@@ -469,9 +469,9 @@ class IV_OT_icons_show(bpy.types.Operator):
self.auto_focusable = True
num_cols = self.get_num_cols(len(pr.popup_icons.filtered_icons))
self.width = min(
self.width = int(min(
ui_scale() * (num_cols * ICON_SIZE + POPUP_PADDING),
context.window.width - WIN_PADDING)
context.window.width - WIN_PADDING))
return context.window_manager.invoke_props_dialog(
self, width=self.width)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment