mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat(tracker): do not wrap around when playing or moving cursor
The wrapping was usually unwanted behaviour. The user can use the looping (Ctrl-L) to loop the song forever if this is really desired.
This commit is contained in:
parent
5e65410d27
commit
877556b428
@ -220,8 +220,8 @@ func (m *Model) change(kind string, t ChangeType, severity ChangeSeverity) func(
|
||||
m.d.ChangedSinceRecovery = true
|
||||
if m.changeType&ScoreChange != 0 {
|
||||
m.updatePatternUseCount()
|
||||
m.d.Cursor.SongPos = m.d.Song.Score.Wrap(m.d.Cursor.SongPos)
|
||||
m.d.Cursor2.SongPos = m.d.Song.Score.Wrap(m.d.Cursor2.SongPos)
|
||||
m.d.Cursor.SongPos = m.d.Song.Score.Clamp(m.d.Cursor.SongPos)
|
||||
m.d.Cursor2.SongPos = m.d.Song.Score.Clamp(m.d.Cursor2.SongPos)
|
||||
m.send(m.d.Song.Score.Copy())
|
||||
}
|
||||
if m.changeType&PatchChange != 0 {
|
||||
@ -353,6 +353,8 @@ func (m *Model) ProcessPlayerMessage(msg PlayerMsg) {
|
||||
m.instrEnlarged = false
|
||||
case Alert:
|
||||
m.Alerts().AddAlert(e)
|
||||
case IsPlayingMsg:
|
||||
m.playing = e.bool
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user