mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
tweak ::define_one_bar() API to allow correct undo/redo command name
This commit is contained in:
parent
db987cf046
commit
b8e9e67f78
2 changed files with 5 additions and 5 deletions
|
|
@ -1393,7 +1393,7 @@ private:
|
||||||
void set_tempo_from_region ();
|
void set_tempo_from_region ();
|
||||||
void use_range_as_bar ();
|
void use_range_as_bar ();
|
||||||
|
|
||||||
void define_one_bar (Temporal::timepos_t const & start, Temporal::timepos_t const & end);
|
void define_one_bar (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string const & from);
|
||||||
|
|
||||||
void audition_region_from_region_list ();
|
void audition_region_from_region_list ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7433,7 +7433,7 @@ Editor::set_tempo_from_region ()
|
||||||
|
|
||||||
RegionView* rv = rs.front();
|
RegionView* rv = rs.front();
|
||||||
|
|
||||||
define_one_bar (rv->region()->position(), rv->region()->end());
|
define_one_bar (rv->region()->position(), rv->region()->end(), _("region"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -7441,12 +7441,12 @@ Editor::use_range_as_bar ()
|
||||||
{
|
{
|
||||||
timepos_t start, end;
|
timepos_t start, end;
|
||||||
if (get_edit_op_range (start, end)) {
|
if (get_edit_op_range (start, end)) {
|
||||||
define_one_bar (start, end);
|
define_one_bar (start, end, _("range"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::define_one_bar (timepos_t const & start, timepos_t const & end)
|
Editor::define_one_bar (timepos_t const & start, timepos_t const & end, std::string const & from)
|
||||||
{
|
{
|
||||||
timecnt_t length = start.distance (end);
|
timecnt_t length = start.distance (end);
|
||||||
|
|
||||||
|
|
@ -7518,7 +7518,7 @@ Editor::define_one_bar (timepos_t const & start, timepos_t const & end)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
TempoMapChange tmc (*this, _("set tempo from region"));
|
TempoMapChange tmc (*this, string_compose (_("set tempo from %1"), from));
|
||||||
|
|
||||||
if (do_global) {
|
if (do_global) {
|
||||||
tmc.map().set_tempo (Tempo (beats_per_minute, t.end_note_types_per_minute(), t.note_type()), timepos_t());
|
tmc.map().set_tempo (Tempo (beats_per_minute, t.end_note_types_per_minute(), t.note_type()), timepos_t());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue