mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
cue editor: fix local tempo scope and use region tempo map
This commit is contained in:
parent
577cdd5f61
commit
ff648b6720
2 changed files with 4 additions and 23 deletions
|
|
@ -298,24 +298,6 @@ CueEditor::get_canvas_cursor () const
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Temporal::TempoMap const>
|
|
||||||
CueEditor::start_local_tempo_map (std::shared_ptr<Temporal::TempoMap> map)
|
|
||||||
{
|
|
||||||
EC_LOCAL_TEMPO_SCOPE;
|
|
||||||
|
|
||||||
std::shared_ptr<Temporal::TempoMap const> tmp = Temporal::TempoMap::use();
|
|
||||||
Temporal::TempoMap::set (map);
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CueEditor::end_local_tempo_map (std::shared_ptr<Temporal::TempoMap const> map)
|
|
||||||
{
|
|
||||||
EC_LOCAL_TEMPO_SCOPE;
|
|
||||||
|
|
||||||
Temporal::TempoMap::set (map);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CueEditor::do_undo (uint32_t n)
|
CueEditor::do_undo (uint32_t n)
|
||||||
{
|
{
|
||||||
|
|
@ -1186,6 +1168,9 @@ CueEditor::set_region (std::shared_ptr<Region> r)
|
||||||
|
|
||||||
_region = r;
|
_region = r;
|
||||||
|
|
||||||
|
std::shared_ptr<TempoMap> tmap (new TempoMap (_region->tempo(), _region->meter()));
|
||||||
|
start_local_tempo_map (tmap);
|
||||||
|
|
||||||
if (!get_canvas()->is_visible()) {
|
if (!get_canvas()->is_visible()) {
|
||||||
_visible_pending_region = r;
|
_visible_pending_region = r;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1414,8 +1399,7 @@ CueEditor::idle_data_captured ()
|
||||||
void
|
void
|
||||||
CueEditor::unset (bool trigger_too)
|
CueEditor::unset (bool trigger_too)
|
||||||
{
|
{
|
||||||
EC_LOCAL_TEMPO_SCOPE;
|
end_local_tempo_map ();
|
||||||
|
|
||||||
_history.clear ();
|
_history.clear ();
|
||||||
history_connection.disconnect();
|
history_connection.disconnect();
|
||||||
_update_connection.disconnect();
|
_update_connection.disconnect();
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,6 @@ class CueEditor : public EditingContext, public PBD::HistoryOwner
|
||||||
|
|
||||||
std::vector<MidiRegionView*> filter_to_unique_midi_region_views (RegionSelection const & ms) const;
|
std::vector<MidiRegionView*> filter_to_unique_midi_region_views (RegionSelection const & ms) const;
|
||||||
|
|
||||||
std::shared_ptr<Temporal::TempoMap const> start_local_tempo_map (std::shared_ptr<Temporal::TempoMap>);
|
|
||||||
void end_local_tempo_map (std::shared_ptr<Temporal::TempoMap const>);
|
|
||||||
|
|
||||||
void scrolled ();
|
void scrolled ();
|
||||||
bool canvas_pre_event (GdkEvent*);
|
bool canvas_pre_event (GdkEvent*);
|
||||||
void catch_pending_show_region ();
|
void catch_pending_show_region ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue