Fix loading sessions w/new tempo-map.
Newly constructed sessions don't save "Tempo-start" property. If there's no "start" node, _legacy_bbt is never explicitly set and the default c'tor is used, which sets bar = 1. The test for legacy session checks bar != 0. All new sessions were processed with fix_legacy_session(), which breaks the tempo-map and makes the session not loadable (duplicate Tempo).
This commit is contained in:
parent
7512692e79
commit
e6c8f104d1
@ -162,6 +162,7 @@ TempoSection::TempoSection (const XMLNode& node, samplecnt_t sample_rate)
|
|||||||
{
|
{
|
||||||
BBT_Time bbt;
|
BBT_Time bbt;
|
||||||
std::string start_bbt;
|
std::string start_bbt;
|
||||||
|
_legacy_bbt.bars = 0; // legacy session check compars .bars != 0; default BBT_Time c'tor uses 1.
|
||||||
if (node.get_property ("start", start_bbt)) {
|
if (node.get_property ("start", start_bbt)) {
|
||||||
if (string_to_bbt_time (start_bbt, bbt)) {
|
if (string_to_bbt_time (start_bbt, bbt)) {
|
||||||
/* legacy session - start used to be in bbt*/
|
/* legacy session - start used to be in bbt*/
|
||||||
|
Loading…
Reference in New Issue
Block a user