13
0

tempodisplay: correctly redisplay tempo map stuff after adding a BBT marker

This commit is contained in:
Paul Davis 2022-08-16 15:50:45 -06:00
parent 6371049eaf
commit 3259ab2d41
3 changed files with 15 additions and 5 deletions

View File

@ -1731,7 +1731,7 @@ private:
Temporal::TempoMap::WritableSharedPtr begin_tempo_map_edit ();
void abort_tempo_map_edit ();
void commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&);
void commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&, bool with_update = false);
void mid_tempo_per_track_update (TimeAxisView&);
void mid_tempo_per_region_update (RegionView*);
bool ignore_map_change;

View File

@ -3525,7 +3525,13 @@ BBTRulerDrag::finished (GdkEvent* event, bool movement_occurred)
}
}
_editor->commit_tempo_map_edit (map);
/* 2nd argument means "update tempo map display after the new map is
* installed. We need to do this because the code above has not
* actually changed anything about how tempo is displayed, it simply
* modified the map.
*/
_editor->commit_tempo_map_edit (map, true);
XMLNode &after = map->get_state();

View File

@ -721,10 +721,14 @@ Editor::abort_tempo_map_edit ()
}
void
Editor::commit_tempo_map_edit (TempoMap::WritableSharedPtr& new_map)
Editor::commit_tempo_map_edit (TempoMap::WritableSharedPtr& new_map, bool with_update)
{
PBD::Unwinder<bool> uw (ignore_map_change, true);
TempoMap::update (new_map);
if (!with_update) {
PBD::Unwinder<bool> uw (ignore_map_change, true);
TempoMap::update (new_map);
} else {
TempoMap::update (new_map);
}
}
void