Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit d980542

Browse files
committed
Update drawing styles on changing Underlay checkbox IfcOpenShell#3172
1 parent 88ba651 commit d980542

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/blenderbim/blenderbim/bim/module/drawing/operator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,8 @@ def execute(self, context):
16061606
active_drawing_style_index = scene.camera.data.BIMCameraProperties.active_drawing_style_index
16071607

16081608
if active_drawing_style_index >= len(scene.DocProperties.drawing_styles):
1609-
return
1609+
self.report({"ERROR"}, "Could not find active drawing style")
1610+
return {"CANCELLED"}
16101611

16111612
self.drawing_style = scene.DocProperties.drawing_styles[active_drawing_style_index]
16121613

src/blenderbim/blenderbim/bim/module/drawing/prop.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ def update_schedule_name(self, context):
178178

179179
def update_has_underlay(self, context):
180180
update_layer(self, context, "HasUnderlay", self.has_underlay)
181+
if self.has_underlay:
182+
bpy.ops.bim.reload_drawing_styles()
183+
bpy.ops.bim.activate_drawing_style()
181184

182185

183186
def update_has_linework(self, context):

0 commit comments

Comments
 (0)