mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
fix(tracker): loading preset did not update the ids
When a preset was loaded, its IDs were not updated, causing ID collisions in the song and send targets going wrong.
This commit is contained in:
parent
db2d9cac9d
commit
e09af5ab34
@ -145,7 +145,9 @@ func (m *Model) LoadPreset(index int) Action {
|
||||
for m.d.InstrIndex >= len(m.d.Song.Patch) {
|
||||
m.d.Song.Patch = append(m.d.Song.Patch, defaultInstrument.Copy())
|
||||
}
|
||||
m.d.Song.Patch[m.d.InstrIndex] = instrumentPresets[index].Copy()
|
||||
newInstr := instrumentPresets[index].Copy()
|
||||
(*Model)(m).assignUnitIDs(newInstr.Units)
|
||||
m.d.Song.Patch[m.d.InstrIndex] = newInstr
|
||||
}, allowed: func() bool {
|
||||
return true
|
||||
}}
|
||||
|
Reference in New Issue
Block a user