Avoid more unnecessary calls to docs api

Noticed that prop_value could be other types besides str (e.g. int when using context menu on UIList item) and we can skip them to avoid redundant api calls.
This commit is contained in:
Andrej730
2024-09-16 18:46:38 +05:00
parent 11ddcb0256
commit 06f14774f7
+1 -1
View File
@@ -1076,7 +1076,7 @@ def draw_custom_context_menu(self, context):
prop = context.button_pointer
prop_name = context.button_prop.identifier
prop_value = getattr(prop, prop_name, None)
if prop_value is None:
if not isinstance(prop_value, str):
return
version = tool.Ifc.get_schema()
layout = self.layout