Ensure we have a region _beat for legacy sessions, set _pulse unconditionally when...
authornick_m <mainsbridge@gmail.com>
Sat, 8 Oct 2016 16:34:13 +0000 (03:34 +1100)
committernick_m <mainsbridge@gmail.com>
Sat, 8 Oct 2016 16:34:13 +0000 (03:34 +1100)
libs/ardour/region.cc

index dd561be7b0c9d177cccb574c3ebf68b595f15203..d602bc2e55b0bde021fc55165b6f909622e48602 100644 (file)
@@ -1311,13 +1311,15 @@ Region::_set_state (const XMLNode& node, int /*version*/, PropertyChange& what_c
                                    &bbt_time.beats,
                                    &bbt_time.ticks) != 3) {
                                _position_lock_style = AudioTime;
+                               _beat = _session.tempo_map().beat_at_frame (_position);
                        } else {
                                _beat = _session.tempo_map().beat_at_bbt (bbt_time);
-                               _pulse = _session.tempo_map().pulse_at_beat (_beat);
                        }
                }
        }
 
+       _pulse = _session.tempo_map().pulse_at_beat (_beat);
+
        /* fix problems with old sessions corrupted by impossible
           values for _stretch or _shift
        */