Don't unnecessarily update NTS or scale pset data

This commit is contained in:
Dion Moult
2024-04-15 23:31:38 +10:00
parent 4174a78bb5
commit 5725ed867f
2 changed files with 11 additions and 1 deletions
@@ -66,6 +66,11 @@ def get_location_hint(self, context):
def update_diagram_scale(self, context):
if not context.scene.camera or context.scene.camera.data != self.id_data:
return
element = tool.Ifc.get_entity(context.scene.camera)
if not element:
return
try:
element = (
tool.Ifc.get()
@@ -87,6 +92,11 @@ def update_diagram_scale(self, context):
def update_is_nts(self, context):
if not context.scene.camera or context.scene.camera.data != self.id_data:
return
element = tool.Ifc.get_entity(context.scene.camera)
if not element:
return
try:
element = (
tool.Ifc.get()
@@ -235,7 +235,7 @@ class LoadSearch(Operator, tool.Ifc.Operator):
def _execute(self, context):
filter_groups = tool.Search.get_filter_groups(self.module)
group = tool.Ifc.get().by_id(int(context.scene.BIMSearchProperties.saved_searches))
query = tool.Search.import_filter_query(tool.Search.get_group_query(group), filter_groups)
tool.Search.import_filter_query(tool.Search.get_group_query(group), filter_groups)
def draw(self, context):
props = context.scene.BIMSearchProperties