Update drawing styles on changing Underlay checkbox #3172

This commit is contained in:
Andrej730
2023-05-19 10:51:27 +05:00
parent fabfa6ad7a
commit c37b71a3d3
2 changed files with 5 additions and 1 deletions
@@ -1606,7 +1606,8 @@ class ActivateDrawingStyle(bpy.types.Operator, Operator):
active_drawing_style_index = scene.camera.data.BIMCameraProperties.active_drawing_style_index
if active_drawing_style_index >= len(scene.DocProperties.drawing_styles):
return
self.report({"ERROR"}, "Could not find active drawing style")
return {"CANCELLED"}
self.drawing_style = scene.DocProperties.drawing_styles[active_drawing_style_index]
@@ -178,6 +178,9 @@ def update_schedule_name(self, context):
def update_has_underlay(self, context):
update_layer(self, context, "HasUnderlay", self.has_underlay)
if self.has_underlay:
bpy.ops.bim.reload_drawing_styles()
bpy.ops.bim.activate_drawing_style()
def update_has_linework(self, context):