FreeCAD / FreeCAD/FreeCAD

Spreadsheet: Configuration table row offset becomes stale when rows are inserted or deleted above the catalog

Open
#30,370 3 comments 0 reactions 0 assignees View on GitHub
Mod: Spreadsheet
Dominant language
C++
Stars
33.6k
Forks
6k
Avg merge
3d 17h
Merged PRs (30d)
196

Description

## Version

```
OS: macOS 15.7.5
Architecture: arm64
Version: 1.1.0.20260325 (Git shallow)
Build date: 2026/03/25 02:17:53
Build type: Release
Branch: (HEAD detached at 34a971666)
Hash: 34a9716668b1ddeb55b914f1c5be644826bdbbbf
Python 3.11.14, Qt 6.8.3, Coin 4.0.3, Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, IfcOpenShell 0.8.4, OCC 7.8.1
```

## Steps to reproduce

1. Open the attached file `ConfigTableRowOffset.FCStd`
2. Confirm working state: the `RivetType` dropdown selects "Small" and the active row (B1/C1) correctly shows `0.15mm / 0.30mm`
3. Select row 1 in the spreadsheet
4. Spreadsheet menu → Insert rows above
5. Type any content in the new row 1 (e.g. a label and value)
6. Recompute

## Expected behavior

The active row continues to show the correct values for the selected catalog entry. Row references in the binding expression and enum source update to reflect the new row positions, consistent with how normal cell references (e.g. `=A1`) update when rows are inserted.

## Actual behavior

The binding expression (`hiddenref(RivetType) + 3`) and the enum source (`cells[<>]`) both contain hardcoded row offsets that are not updated. The active row silently shows wrong data — in this case the catalog header row values ("Height", "Diameter") rather than the selected type's dimensions. No error or warning is produced.

## Additional context

Both the binding offset and the enum source row are affected simultaneously. The bug has been confirmed present in 1.1.0 and 1.2.0.

The attached file reproduces with no mods required — only the built-in Spreadsheet workbench.

Related: #14578, #15247, #15249, #15948

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.