Door columns shift to Q/R/S/T after column P deletion 🟩

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-06-30 12:58:46 +00:00
parent 372586bb29
commit 7fcb64bd8c

View file

@ -11,7 +11,7 @@ from domain.magicplan.models import Door, Plan, Room, Window
_DATA_START_ROW = 6
_MAX_ROWS = 50
_DOOR_AREA_COL = "U"
_DOOR_AREA_COL = "T"
_DOOR_AREA_CF_RANGE = f"{_DOOR_AREA_COL}{_DATA_START_ROW}:{_DOOR_AREA_COL}{_DATA_START_ROW + _MAX_ROWS - 1}"
_Y_THRESHOLD = 7600
_DOOR_AREA_HEADER = CellRichText(
@ -94,9 +94,9 @@ def populate_sheet(sheet: Any, plan: Plan) -> None:
for i, (room_name, door) in enumerate(doors):
row = _DATA_START_ROW + i
vent = door.ventilation
_write_cell(sheet, row, "R", room_name)
_write_cell(sheet, row, "S", door.width_mm)
_write_cell(sheet, row, "T", vent.undercut_mm if vent else 0)
# U = formula =S*T — do not write
_write_cell(sheet, row, "Q", room_name)
_write_cell(sheet, row, "R", door.width_mm)
_write_cell(sheet, row, "S", vent.undercut_mm if vent else 0)
# T = formula =R*S — do not write
_apply_column_y_formatting(sheet)