mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat: add ability to select & move multiple units (closes #71)
This commit is contained in:
parent
5884a8d195
commit
61776f397a
@ -67,13 +67,13 @@ type Tracker struct {
|
||||
}
|
||||
|
||||
func (t *Tracker) UnmarshalContent(bytes []byte) error {
|
||||
var unit sointu.Unit
|
||||
if errJSON := json.Unmarshal(bytes, &unit); errJSON == nil {
|
||||
t.PasteUnit(unit)
|
||||
var units []sointu.Unit
|
||||
if errJSON := json.Unmarshal(bytes, &units); errJSON == nil {
|
||||
t.PasteUnits(units)
|
||||
return nil
|
||||
}
|
||||
if errYaml := yaml.Unmarshal(bytes, &unit); errYaml == nil {
|
||||
t.PasteUnit(unit)
|
||||
if errYaml := yaml.Unmarshal(bytes, &units); errYaml == nil {
|
||||
t.PasteUnits(units)
|
||||
return nil
|
||||
}
|
||||
var instr sointu.Instrument
|
||||
|
Reference in New Issue
Block a user