Allow favourites to be inserted manually into the sequence within a backup file

This commit is contained in:
HummyPkg 2018-12-09 21:59:05 +00:00
parent f3fc621de1
commit 9de13741c8

View File

@ -1213,6 +1213,8 @@ proc {rsv restore} {file} {
)} )}
set grp 0 set grp 0
set inc 0
set lastidx 1
foreach line $data { foreach line $data {
set vals [split $line "\t"] set vals [split $line "\t"]
@ -1230,7 +1232,16 @@ proc {rsv restore} {file} {
lassign $vals x group type chan idx lassign $vals x group type chan idx
if {$idx eq ""} { set idx 0 } if {$idx eq ""} {
# This is to support old format backup files where
# the favourite index is not present.
set idx 0
} elseif {$idx eq "-"} {
set idx $lastidx
incr inc
}
set lastidx $idx
incr idx $inc
if {$grp != $group} { if {$grp != $group} {
set grp $group set grp $group