mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
fix(tracker/gioui): advance row by step when inputting a note
Closes #144.
This commit is contained in:
parent
1daaf1829c
commit
4e1fdf57d9
@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
resized ([#145][i145])
|
||||
|
||||
### Fixed
|
||||
- When inputting a note to the note editor, advance the cursor by step
|
||||
([#144][i144])
|
||||
- When loading an instrument, make sure the total number of voices does not go
|
||||
over the maximum number allowed by vm, and make sure a loaded instrument has
|
||||
at least 1 voice
|
||||
@ -191,5 +193,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
[i130]: https://github.com/vsariola/sointu/issues/130
|
||||
[i139]: https://github.com/vsariola/sointu/issues/139
|
||||
[i142]: https://github.com/vsariola/sointu/issues/142
|
||||
[i144]: https://github.com/vsariola/sointu/issues/144
|
||||
[i145]: https://github.com/vsariola/sointu/issues/145
|
||||
[i146]: https://github.com/vsariola/sointu/issues/146
|
||||
|
@ -341,6 +341,10 @@ func noteAsValue(octave, note int) byte {
|
||||
func (te *NoteEditor) command(gtx C, t *Tracker, e key.Event) {
|
||||
if e.Name == "A" || e.Name == "1" {
|
||||
t.Model.Notes().Table().Fill(0)
|
||||
if step := t.Model.Step().Value(); step > 0 {
|
||||
te.scrollTable.Table.MoveCursor(0, step)
|
||||
te.scrollTable.Table.SetCursor2(te.scrollTable.Table.Cursor())
|
||||
}
|
||||
te.scrollTable.EnsureCursorVisible()
|
||||
return
|
||||
}
|
||||
@ -360,6 +364,10 @@ func (te *NoteEditor) command(gtx C, t *Tracker, e key.Event) {
|
||||
}
|
||||
return
|
||||
validNote:
|
||||
if step := t.Model.Step().Value(); step > 0 {
|
||||
te.scrollTable.Table.MoveCursor(0, step)
|
||||
te.scrollTable.Table.SetCursor2(te.scrollTable.Table.Cursor())
|
||||
}
|
||||
te.scrollTable.EnsureCursorVisible()
|
||||
if _, ok := t.KeyPlaying[e.Name]; !ok {
|
||||
trk := te.scrollTable.Table.Cursor().X
|
||||
|
Loading…
x
Reference in New Issue
Block a user