Skip to content

Fix broken layout in the Multiple Surnames editor - #2485

Open
dsblank wants to merge 1 commit into
gramps-project:maintenance/gramps61from
dsblank:fix/surname-column-widths
Open

Fix broken layout in the Multiple Surnames editor#2485
dsblank wants to merge 1 commit into
gramps-project:maintenance/gramps61from
dsblank:fix/surname-column-widths

Conversation

@dsblank

@dsblank dsblank commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Column widths in the Person Editor's "Multiple Surnames" table (Prefix, Surname, Connector, Origin, Primary) did not persist across dialog opens. SurnameTab appends its Origin and Primary columns after calling the base EmbeddedList.build_columns(), but that method restored saved widths before those extra columns existed, so Origin/Primary always reset to their hard-coded defaults.
  • The Origin column used GROW_ONLY sizing instead of FIXED, which made its resize handle (between Origin and Primary) resist shrinking and feel "stuck."
  • Default widths for Prefix, Connector, and Origin were quite small (150/100/150px); widened slightly (170/130/160px) so they aren't cramped out of the box.

Fix

  • Moved restore_column_size() in embeddedlist.py to run after build_columns() fully completes (in EmbeddedList.__init__), instead of partway through, so subclasses that append extra columns (only SurnameTab does this) get all their saved widths restored correctly.
  • Set Gtk.TreeViewColumnSizing.FIXED on the Origin column in surnametab.py, matching the other columns, so drag-resizing behaves consistently.
  • Bumped the default column widths.

Test plan

  • black --check passes on changed files and repo-wide
  • Manually verified in a running instance: resized all 5 columns, closed and reopened the Person Editor's Multiple Surnames table, confirmed all widths (including Origin and Primary) persisted
  • Reviewer: please verify on your own family tree

Fixes 0013365.

Column widths for the Multiple Surnames table no longer persisted
correctly. SurnameTab appends its Origin and Primary columns after
calling the base EmbeddedList.build_columns(), but that method
restored saved column widths before those extra columns existed, so
they always reset to their built-in defaults on every dialog open.
The saved widths are now restored once all columns are in place.

The Origin column also now uses fixed-width sizing like the other
columns, so its resize handle drags predictably instead of resisting
attempts to shrink it. The default widths for the Prefix, Connector,
and Origin columns have been widened so they are no longer cramped.

Fixes #13365.
@dsblank
dsblank requested a review from a team July 30, 2026 21:36
@dsblank dsblank added this to the v6.1 milestone Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant