feat(alignments): import alignments from another series, and confirm overwrites - #128
Open
dustenhubbard wants to merge 1 commit into
Open
feat(alignments): import alignments from another series, and confirm overwrites#128dustenhubbard wants to merge 1 commit into
dustenhubbard wants to merge 1 commit into
Conversation
…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.
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.
Adds a
.jsersource toAlignments ▸ 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 sameSeries.importTransformscall.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..txtand SWiFT cannot collide: both derive the name as{filename}-{date}.Also renames the Alignments import submenu's
attr_namefromimportmenu, whichSeries ▸ Importalready uses.populateMenuBardoessetattrby 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