See #5337. Grid decorators now turn off when editing an axis.

This commit is contained in:
Dion Moult
2024-09-07 10:01:51 +10:00
parent 0337034d28
commit 7905cd8bd3
2 changed files with 6 additions and 1 deletions
@@ -67,6 +67,9 @@ class GridDecorator:
for axis in context.scene.BIMGridProperties.grid_axes:
if not (obj := axis.obj):
continue
if obj.select_get() and context.mode != "OBJECT":
continue
tag = obj.name.split("/")[-1]
matrix_world = obj.matrix_world
v1 = matrix_world @ obj.data.vertices[0].co
@@ -115,6 +118,8 @@ class GridDecorator:
for axis in context.scene.BIMGridProperties.grid_axes:
if obj := axis.obj:
if obj.select_get():
if context.mode != "OBJECT":
continue
edges = selected_edges
verts = selected_verts
else:
+1 -1
View File
@@ -456,7 +456,7 @@ class BIM_PT_tabs(Panel):
op.uri = "https://docs.bonsaibim.org/guides/troubleshooting.html#saving-and-loading-blend-files"
row.operator("bim.close_blend_warning", text="", icon="CANCEL")
if context.mode != context.scene.BIMGeometryProperties.mode:
if not context.mode.startswith(context.scene.BIMGeometryProperties.mode):
box = self.layout.box()
box.alert = True
row = box.row(align=True)