summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-27 10:09:58 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-27 10:09:58 -0500
commitd23c2499bf5ebf9cd98fd44b0e0d76b415af1ac0 (patch)
tree20e21937751906dd1b2c6a1fe3886ef85a2dad84 /gtk2_ardour/editor_tempodisplay.cc
parent2c79f74e49cb4ab96724d6183435e8f47b15c7d1 (diff)
rationalize, consolidate and make work dbl-click editing for regions and markers, as part of the Drag model rather than discretely
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc34
1 files changed, 4 insertions, 30 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index b997d3bb5d..11c5513f68 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -343,41 +343,15 @@ Editor::edit_tempo_section (TempoSection* section)
}
void
-Editor::edit_tempo_marker (ArdourCanvas::Item *item)
+Editor::edit_tempo_marker (TempoMarker& tm)
{
- Marker* marker;
- TempoMarker* tempo_marker;
-
- if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
- fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
- /*NOTREACHED*/
- }
-
- if ((tempo_marker = dynamic_cast<TempoMarker*> (marker)) == 0) {
- fatal << _("programming error: marker for tempo is not a tempo marker!") << endmsg;
- /*NOTREACHED*/
- }
-
- edit_tempo_section (&tempo_marker->tempo());
+ edit_tempo_section (&tm.tempo());
}
void
-Editor::edit_meter_marker (ArdourCanvas::Item *item)
+Editor::edit_meter_marker (MeterMarker& mm)
{
- Marker* marker;
- MeterMarker* meter_marker;
-
- if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
- fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
- /*NOTREACHED*/
- }
-
- if ((meter_marker = dynamic_cast<MeterMarker*> (marker)) == 0) {
- fatal << _("programming error: marker for meter is not a meter marker!") << endmsg;
- /*NOTREACHED*/
- }
-
- edit_meter_section (&meter_marker->meter());
+ edit_meter_section (&mm.meter());
}
gint