Skip to content

Commit

Permalink
Fix bug where you couldn't add layers to a fresh project
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult committed Mar 13, 2021
1 parent 510dca1 commit 4564ee3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/ifcblenderexport/blenderbim/bim/module/layer/ui.py
Expand Up @@ -21,17 +21,13 @@ def draw(self, context):

self.props = context.scene.BIMLayerProperties

if Data.layers:
row = self.layout.row(align=True)
row.label(text="{} Layers Found".format(len(Data.layers.keys())))
if self.props.is_editing:
row.operator("bim.add_presentation_layer", text="", icon="ADD")
row.operator("bim.disable_layer_editing_ui", text="", icon="X")
else:
row.operator("bim.load_layers", text="", icon="IMPORT")
row = self.layout.row(align=True)
row.label(text="{} Layers Found".format(len(Data.layers.keys())))
if self.props.is_editing:
row.operator("bim.add_presentation_layer", text="", icon="ADD")
row.operator("bim.disable_layer_editing_ui", text="", icon="X")
else:
row = self.layout.row(align=True)
row.label(text="No Layers")
row.operator("bim.load_layers", text="", icon="GREASEPENCIL")

if self.props.is_editing:
self.layout.template_list(
Expand Down

0 comments on commit 4564ee3

Please sign in to comment.