mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 17:20:04 +00:00
Fix bug where you couldn't add layers to a fresh project
This commit is contained in:
@@ -21,17 +21,13 @@ class BIM_PT_layers(Panel):
|
|||||||
|
|
||||||
self.props = context.scene.BIMLayerProperties
|
self.props = context.scene.BIMLayerProperties
|
||||||
|
|
||||||
if Data.layers:
|
row = self.layout.row(align=True)
|
||||||
row = self.layout.row(align=True)
|
row.label(text="{} Layers Found".format(len(Data.layers.keys())))
|
||||||
row.label(text="{} Layers Found".format(len(Data.layers.keys())))
|
if self.props.is_editing:
|
||||||
if self.props.is_editing:
|
row.operator("bim.add_presentation_layer", text="", icon="ADD")
|
||||||
row.operator("bim.add_presentation_layer", text="", icon="ADD")
|
row.operator("bim.disable_layer_editing_ui", text="", icon="X")
|
||||||
row.operator("bim.disable_layer_editing_ui", text="", icon="X")
|
|
||||||
else:
|
|
||||||
row.operator("bim.load_layers", text="", icon="IMPORT")
|
|
||||||
else:
|
else:
|
||||||
row = self.layout.row(align=True)
|
row.operator("bim.load_layers", text="", icon="GREASEPENCIL")
|
||||||
row.label(text="No Layers")
|
|
||||||
|
|
||||||
if self.props.is_editing:
|
if self.props.is_editing:
|
||||||
self.layout.template_list(
|
self.layout.template_list(
|
||||||
|
|||||||
Reference in New Issue
Block a user