Skip to content

Add Duplicate Interrupt button to Edit Interrupt window#554

Open
Kamayana wants to merge 3 commits intopyanodon:masterfrom
Kamayana:duplicate-interrupt
Open

Add Duplicate Interrupt button to Edit Interrupt window#554
Kamayana wants to merge 3 commits intopyanodon:masterfrom
Kamayana:duplicate-interrupt

Conversation

@Kamayana
Copy link

@Kamayana Kamayana commented Feb 8, 2026

Adds a button to the Edit Interrupt window that duplicates the currently opened interrupt, adds it to the selected caravan, and switches to editing that duplicate. Closes pyanodon/pybugreports#1245, though parameters aren't supported.

image

image

  • The duplicate will have an * appended to the end.
    • Unless the name text field was being edited, in which case it will have that name instead.
  • Any unsaved changes made in the Edit Interrupt window will be applied to the duplicate, leaving the original interrupt unchanged. Think of it like "Save As" vs. "Save".
  • I originally wanted to go with the "name copy", "name copy (2)" naming scheme used in windows, but I couldn't figure out how to make localized names work in this case, since here it's being used as both the actual name and the internal lua key, so I kept getting a "Value must be a string in property tree at ROOT.text" crash.
  • When Delete Interrupt is clicked, the duplicate button is hidden until the deletion is confirmed or not.

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.

Copy paste or clone caravan interrupts

1 participant