temporal: fix up some logic relating to scoped tempo maps (GUI)

This commit is contained in:
Paul Davis 2025-08-11 15:41:18 -06:00
parent dd41fddcad
commit a2c0183cbc
3 changed files with 21 additions and 11 deletions

View file

@ -402,7 +402,7 @@ AudioClipEditor::drop_waves ()
void
AudioClipEditor::set_trigger (TriggerReference& tr)
{
EC_LOCAL_TEMPO_SCOPE;
/* NO LOCAL TEMPO SCOPE */
if (tr == ref) {
return;
@ -418,7 +418,7 @@ AudioClipEditor::set_trigger (TriggerReference& tr)
void
AudioClipEditor::set_region (std::shared_ptr<Region> region)
{
EC_LOCAL_TEMPO_SCOPE;
/* NO LOCAL TEMPO SCOPE */
CueEditor::set_region (region);

View file

@ -1158,6 +1158,8 @@ CueEditor::set_track (std::shared_ptr<Track> t)
void
CueEditor::set_region (std::shared_ptr<Region> r)
{
/* NO LOCAL TEMPO SCOPE HERE */
if (r == _region) {
return;
}
@ -1166,13 +1168,17 @@ CueEditor::set_region (std::shared_ptr<Region> r)
_region = r;
std::shared_ptr<TempoMap> tmap = _region->tempo_map();
if (tmap) {
start_local_tempo_map (tmap);
}
if (_region) {
std::shared_ptr<TempoMap> tmap = _region->tempo_map();
if (tmap) {
start_local_tempo_map (tmap);
}
if (!get_canvas()->is_visible()) {
_visible_pending_region = r;
if (!get_canvas()->is_visible()) {
_visible_pending_region = r;
} else {
_visible_pending_region.reset ();
}
} else {
_visible_pending_region.reset ();
}
@ -1212,7 +1218,7 @@ CueEditor::set_from_rsu (RegionUISettings& rsu)
void
CueEditor::set_trigger (TriggerReference& tref)
{
EC_LOCAL_TEMPO_SCOPE;
/* NO TEMPO SCOPE */
if (tref == ref) {
return;
@ -1399,7 +1405,11 @@ CueEditor::idle_data_captured ()
void
CueEditor::unset (bool trigger_too)
{
end_local_tempo_map ();
/* NO LOCAL TEMPO SCOPE HERE */
if (_local_tempo_map) {
end_local_tempo_map ();
}
_history.clear ();
history_connection.disconnect();
_update_connection.disconnect();

View file

@ -1378,7 +1378,7 @@ Pianoroll::region_prop_change (PBD::PropertyChange const & what_changed)
void
Pianoroll::set_trigger (TriggerReference & tref)
{
EC_LOCAL_TEMPO_SCOPE;
/* NO LOCAL TEMPO SCOPE */
if (ref == tref) {
return;