In planning out the new phrase-driven cues with @Kevinnns it became clear that it would be important to be able to have cues shared between multiple different triggers in a way that allows changes to be made in one place which updates all of them. Kicking it over for a few days, including some swim thinking (my most effective kind of “hammock time”) has yielded a design that will allow nice forward migration even for existing cues in shows.
[x] There will be a new Link/Unlink button below the Gear button in the Cue row. The icon of this new button will change to show the current link state.
[x] When originally creating a cue from the library, it will be Linked to the library entry. This is implemented by adding a :linked entry to the cue map which holds the name of the library cue it is linked to.
[x] Whenever a linked cue is edited, the library copy, and any other cues linked to the same library cue, are updated to match. (Of course this excludes attributes of the cue which are sanitized from the library, namely its name, position, and hue. And unlinking a cue doesn’t unlink any other cues, just this one.) We need to iterate over any open cue editors that are showing linked cues and update their content as well.
[x] Similarly, when you add a cue to the library, the cue in the track becomes linked to that new library cue.
[x] Choosing the Link button when in Linked state will offer the option to unlink the cue, naming the library cue (including folder, ideally) that it is currently linked to. You can unlink a cue at any time, which will stop this propagation in both directions.
[x] The old “update library cue” and ”remove library cue” modes of the library entry in the Gear menu get really awkward now. It should probably just be grayed out if the cue is linked and matches any library cue name, and when unlinked but the name matches a library cue, could offer an alternate way to re-link to that cue, or just stay grayed out.
[x] This means we need a new way to remove cues from the library. I think a new “Manage Cues” submenu above “Manage Folders” could have “Remove Cue” and “Rename Cue” options that give you hierarchical access to the cues, and confirm removal (if removing a linked cue, also talking about the link breakage). Renaming to an existing name would be prohibited; renaming to an available name would update the links in all linked cues.
[x] Adding a linked cue to the library under a different name does not copy the :linked entry, of course (this keyword needs to be added to sanitize-cue-for-library). Cues created from the new library cue will be linked to it, not the original linked cue. And the track cue is now linked to the new library cue instead of what it used to link to.
[x] Because the old trick of “just remove a library cue and add it in a different folder if you want to move it” will be much more painful if that means you need to re-link all the cues that had been linked to it before, we need to build a new actual interface for moving cues between folders. This could be another entry in the “Manage Cues” submenu, “Move Cue”.
[x] A nice touch would be to help avoid confusion due to battling expression editors: when you edit an expression in a linked cue, if there is any editor for that same expression open for another linked cue, even in a different track, bring that window to the front instead of opening a new one.
If you try to copy a track to another show, and it has linked cues in it:
[x] If the library cues that are linked to have names that are unique in the new show, they are copied to that show as well (if they are in a folder that exists in both shows, they stay in that folder, otherwise they go to the top level).
[x] If they share a name with an existing library cue in the destination show, if their contents are identical, then the track is copied and the cues are linked to the existing library cues.
[x] Otherwise an error is displayed, listing the names of the linked library cues with conflicting content, and saying the track can’t be copied until those cues are either adjusted to have the same content, or renamed in one show or the other.
If you try to copy a track to another show, and it has linked cues in it there are additional implications. The important details have been moved up to the task list in the main issue description.
In planning out the new phrase-driven cues with @Kevinnns it became clear that it would be important to be able to have cues shared between multiple different triggers in a way that allows changes to be made in one place which updates all of them. Kicking it over for a few days, including some swim thinking (my most effective kind of “hammock time”) has yielded a design that will allow nice forward migration even for existing cues in shows.
:linked
entry to the cue map which holds the name of the library cue it is linked to.:linked
entry, of course (this keyword needs to be added tosanitize-cue-for-library
). Cues created from the new library cue will be linked to it, not the original linked cue. And the track cue is now linked to the new library cue instead of what it used to link to.If you try to copy a track to another show, and it has linked cues in it: