mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Fix #1056. Fix error in case you switch drawing styles and the style it used to have was deleted.
This commit is contained in:
@@ -3734,9 +3734,10 @@ class ActivateDrawingStyle(bpy.types.Operator):
|
|||||||
bl_label = 'Activate Drawing Style'
|
bl_label = 'Activate Drawing Style'
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
self.drawing_style = bpy.context.scene.DocProperties.drawing_styles[context.scene.camera.data.BIMCameraProperties.active_drawing_style_index]
|
if context.scene.camera.data.BIMCameraProperties.active_drawing_style_index >= len(bpy.context.scene.DocProperties.drawing_styles):
|
||||||
self.set_raster_style()
|
self.drawing_style = bpy.context.scene.DocProperties.drawing_styles[context.scene.camera.data.BIMCameraProperties.active_drawing_style_index]
|
||||||
self.set_query()
|
self.set_raster_style()
|
||||||
|
self.set_query()
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
def set_raster_style(self):
|
def set_raster_style(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user