fix: assign new IDs to loaded instruments

Fixes #146.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-09-06 20:14:46 +03:00
parent 569958547e
commit d46605c638
3 changed files with 36 additions and 0 deletions

View File

@ -171,6 +171,7 @@ success:
for len(m.d.Song.Patch) <= m.d.InstrIndex {
m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy())
}
m.assignUnitIDs(instrument.Units)
m.d.Song.Patch[m.d.InstrIndex] = instrument
if m.d.Song.Patch[m.d.InstrIndex].Comment != "" {
m.commentExpanded = true