Fix broken layout in the Multiple Surnames editor - #2485
Open
dsblank wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SurnameTabappends its Origin and Primary columns after calling the baseEmbeddedList.build_columns(), but that method restored saved widths before those extra columns existed, so Origin/Primary always reset to their hard-coded defaults.GROW_ONLYsizing instead ofFIXED, which made its resize handle (between Origin and Primary) resist shrinking and feel "stuck."Fix
restore_column_size()inembeddedlist.pyto run afterbuild_columns()fully completes (inEmbeddedList.__init__), instead of partway through, so subclasses that append extra columns (onlySurnameTabdoes this) get all their saved widths restored correctly.Gtk.TreeViewColumnSizing.FIXEDon the Origin column insurnametab.py, matching the other columns, so drag-resizing behaves consistently.Test plan
black --checkpasses on changed files and repo-wideFixes 0013365.