Skip to content

feat(alignments): import alignments from another series, and confirm overwrites - #128

Open
dustenhubbard wants to merge 1 commit into
mainfrom
feat/import-alignments-from-jser
Open

feat(alignments): import alignments from another series, and confirm overwrites#128
dustenhubbard wants to merge 1 commit into
mainfrom
feat/import-alignments-from-jser

Conversation

@dustenhubbard

@dustenhubbard dustenhubbard commented Jul 31, 2026

Copy link
Copy Markdown
Member

Adds a .jser source to Alignments ▸ Import alignments, and confirms before an import replaces an alignment the series already has.

Taking an alignment from another series was reachable only through Series ▸ Import ▸ from series, where alignments are one of seven tabs. From another series (.jser)... now sits first in the Alignments submenu over the same Series.importTransforms call.

A target name the series already used was rejected outright, so an existing alignment could not be updated in place without renaming it and revisiting every object assigned to it. Imports now take allow_overwrite, and a real collision prompts with the alignments that would be replaced. Declining imports nothing. Palettes and brightness/contrast keep the rejection, since neither records undo state. .txt and SWiFT cannot collide: both derive the name as {filename}-{date}.

Also renames the Alignments import submenu's attr_name from importmenu, which Series ▸ Import already uses. populateMenuBar does setattr by that key, so one submenu was overwriting the other on the main window. Latent today, since nothing reads it.

Includes 24 tests. The repo has no tests/ directory, so this adds one. Issue #110 asks for this prompt and also for the log to distinguish an updated alignment from a new one. The log half is not part of this change, so #110 stays open.

Closes #120

…overwrites

Alignments > Import alignments offered .txt and SWiFT only. Taking an
alignment from another series was reachable only through Series > Import >
from series, the whole-series merge dialog, so a user looking for an
alignment import did not find it. Add a "From another series (.jser)..."
source that opens a one-tab dialog over the same Series.importTransforms
call, and put it first in the submenu.

Importing an alignment under a name the series already uses was rejected
outright, which meant an alignment could not be updated in place. Allow it
for alignments and confirm first, naming the alignments that would be
replaced. Palettes and brightness/contrast profiles keep the rejection.

Also renames the Alignments import submenu's attr_name from importmenu to
importalignmentsmenu. Series > Import already claims importmenu, and
populateMenuBar setattr()s by that key, so the two submenus were writing
over each other on the main window.

Adds tests/ with 24 tests over the menu row, the collision decision, the
prompt wording, and the handler's exit paths, plus a test extra and a
testpaths pin so collection does not reach packaging/smoke_test.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move "Import transforms" under Alignments, with an overwrite warning

1 participant