Fix #5770 so sheet subitems can be opened using svg command too, not just the main sheet. I was a little overzealous adding poll methods in 099703f

This commit is contained in:
Stephen Boddy
2024-11-20 11:20:56 +00:00
committed by Andrej
parent 4bde423c50
commit 04e84f7aed
@@ -1503,15 +1503,6 @@ class OpenLayout(bpy.types.Operator, tool.Ifc.Operator):
)
bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
props = context.scene.DocProperties
active_sheet = props.sheets[props.active_sheet_index]
if not active_sheet.is_sheet:
cls.poll_message_set("No sheet selected.")
return False
return True
def _execute(self, context):
self.props = context.scene.DocProperties
sheet = tool.Ifc.get().by_id(self.props.sheets[self.props.active_sheet_index].ifc_definition_id)