mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
fix(tracker): ID collisions in ClearUnit and Instruments.unmarshal
This commit is contained in:
parent
9da6c2216c
commit
74972b5ff4
@ -154,6 +154,7 @@ func (m *Model) ClearUnit() Action {
|
||||
defer (*Model)(m).change("DeleteUnitAction", PatchChange, MajorChange)()
|
||||
m.d.UnitIndex = intMax(intMin(m.d.UnitIndex, len(m.d.Song.Patch[m.d.InstrIndex].Units)-1), 0)
|
||||
m.d.Song.Patch[m.d.InstrIndex].Units[m.d.UnitIndex] = sointu.Unit{}
|
||||
m.d.Song.Patch[m.d.InstrIndex].Units[m.d.UnitIndex].ID = m.maxID() + 1
|
||||
},
|
||||
allowed: func() bool {
|
||||
return m.d.InstrIndex >= 0 &&
|
||||
|
Reference in New Issue
Block a user