From bb62f10715a871d7069d2b2c74b2efc97c3c350c Mon Sep 17 00:00:00 2001
From: Paul Golter <paulgolter>
Date: Tue, 22 Feb 2022 11:51:20 +1100
Subject: [PATCH] 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
---
 development_icon_get.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/development_icon_get.py b/development_icon_get.py
index e8901eca1..cf214fa22 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)
-- 
GitLab