summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_actions.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-10 16:01:20 +0100
committerRobin Gareus <robin@gareus.org>2016-12-10 21:30:30 +0100
commit914224f808a5611029434c55855448c82053d0f8 (patch)
tree14076135e03d828e96778dca0799ba2309280973 /gtk2_ardour/editor_actions.cc
parent1468e270defc24de767e86118d0210480fad27b9 (diff)
Add editor actions to set tempo and meter
Diffstat (limited to 'gtk2_ardour/editor_actions.cc')
-rw-r--r--gtk2_ardour/editor_actions.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index c9f63c02ba..44d8063af8 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -38,6 +38,7 @@
#include "editing.h"
#include "editor.h"
#include "gui_thread.h"
+#include "main_clock.h"
#include "time_axis_view.h"
#include "ui_config.h"
#include "utils.h"
@@ -202,6 +203,9 @@ Editor::register_actions ()
reg_sens (editor_actions, "select-punch-range", _("Set Range to Punch Range"), sigc::mem_fun(*this, &Editor::set_selection_from_punch));
reg_sens (editor_actions, "select-from-regions", _("Set Range to Selected Regions"), sigc::mem_fun(*this, &Editor::set_selection_from_region));
+ reg_sens (editor_actions, "edit-current-tempo", _("Edit Current Tempo"), sigc::mem_fun(*this, &Editor::edit_current_meter));
+ reg_sens (editor_actions, "edit-current-meter", _("Edit Current Meter"), sigc::mem_fun(*this, &Editor::edit_current_tempo));
+
reg_sens (editor_actions, "select-all-after-edit-cursor", _("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true, false));
reg_sens (editor_actions, "alternate-select-all-after-edit-cursor", _("Select All After Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), true, false));
reg_sens (editor_actions, "select-all-before-edit-cursor", _("Select All Before Edit Point"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_selectables_using_edit), false, false));
@@ -991,6 +995,20 @@ Editor::toggle_measure_visibility ()
}
}
+void
+Editor::edit_current_meter ()
+{
+ ARDOUR::MeterSection* ms = const_cast<ARDOUR::MeterSection*>(&_session->tempo_map().meter_section_at_frame (ARDOUR_UI::instance()->primary_clock->absolute_time()));
+ edit_meter_section (ms);
+}
+
+void
+Editor::edit_current_tempo ()
+{
+ ARDOUR::TempoSection* ts = const_cast<ARDOUR::TempoSection*>(&_session->tempo_map().tempo_section_at_frame (ARDOUR_UI::instance()->primary_clock->absolute_time()));
+ edit_tempo_section (ts);
+}
+
RefPtr<RadioAction>
Editor::snap_type_action (SnapType type)
{