mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user