mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 17:26:30 +00:00
Fix error when displaying a selected but inactive object's properties with the pin feature
This commit is contained in:
@@ -31,6 +31,8 @@ class BIM_PT_aggregate(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
props = context.active_object.BIMObjectProperties
|
props = context.active_object.BIMObjectProperties
|
||||||
if not props.ifc_definition_id:
|
if not props.ifc_definition_id:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ class BIM_PT_object_attributes(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ class BIM_PT_classification_references(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ class BIM_PT_object_constraints(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ class BIM_PT_object_documents(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
return bool(context.active_object.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class BIM_PT_representations(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return IfcStore.get_file()
|
return IfcStore.get_file()
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ class BIM_PT_object_groups(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
return IfcStore.get_file() and context.active_object.BIMObjectProperties.ifc_definition_id
|
return IfcStore.get_file() and context.active_object.BIMObjectProperties.ifc_definition_id
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ class BIM_PT_object_material(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
props = context.active_object.BIMObjectProperties
|
props = context.active_object.BIMObjectProperties
|
||||||
if not props.ifc_definition_id:
|
if not props.ifc_definition_id:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class BIM_PT_class(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
return IfcStore.get_file()
|
return IfcStore.get_file()
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ class BIM_PT_object_systems(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
return IfcStore.get_file() and context.active_object.BIMObjectProperties.ifc_definition_id
|
return IfcStore.get_file() and context.active_object.BIMObjectProperties.ifc_definition_id
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ class BIM_PT_type(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
props = context.active_object.BIMObjectProperties
|
props = context.active_object.BIMObjectProperties
|
||||||
if not props.ifc_definition_id:
|
if not props.ifc_definition_id:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class BIM_PT_voids(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
if not context.active_object:
|
||||||
|
return False
|
||||||
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
if not IfcStore.get_element(context.active_object.BIMObjectProperties.ifc_definition_id):
|
||||||
return False
|
return False
|
||||||
return IfcStore.get_file()
|
return IfcStore.get_file()
|
||||||
|
|||||||
Reference in New Issue
Block a user