diff options
author | Paul Golter <paulgolter> | 2022-02-22 03:51:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2022-02-22 03:57:35 +0300 |
commit | bb62f10715a871d7069d2b2c74b2efc97c3c350c (patch) | |
tree | cb3f3fb4cc03b926bdc04456ff305866753d0c6a /development_icon_get.py | |
parent | 7476c1ac248472c1442b3fb1cb3e0a79747e48f6 (diff) |
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
Diffstat (limited to 'development_icon_get.py')
-rw-r--r-- | development_icon_get.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/development_icon_get.py b/development_icon_get.py index e8901eca..cf214fa2 100644 --- a/development_icon_get.py +++ b/development_icon_get.py @@ -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) |