summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_cursors.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-07-07 08:16:57 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-07-07 08:16:57 -0400
commit4685a15b1fda18046a11473cd89854ddd96b5c51 (patch)
treeb044003060396335f7441117d49f9e9ebc50778f /gtk2_ardour/editor_cursors.cc
parenta1bc2cb10e1cc6fa05b04c85f98cf0622afe99f1 (diff)
add new variant of EditorCursor that creates an insensitive full-canvas-height line, and fix destructor leak
Diffstat (limited to 'gtk2_ardour/editor_cursors.cc')
-rw-r--r--gtk2_ardour/editor_cursors.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc
index ffe6fc0d01..740b96f965 100644
--- a/gtk2_ardour/editor_cursors.cc
+++ b/gtk2_ardour/editor_cursors.cc
@@ -52,9 +52,24 @@ EditorCursor::EditorCursor (Editor& ed, bool (Editor::*callbck)(GdkEvent*,Ardour
_current_frame = 1; /* force redraw at 0 */
}
-EditorCursor::~EditorCursor ()
+EditorCursor::EditorCursor (Editor& ed)
+ : _editor (ed)
+ , _track_canvas_item (new ArdourCanvas::Arrow (_editor.get_hscroll_group()))
+ , _length (1.0)
{
+ CANVAS_DEBUG_NAME (_track_canvas_item, "track canvas cursor");
+
+ _track_canvas_item->set_show_head (0, false);
+ _track_canvas_item->set_show_head (1, false);
+ _track_canvas_item->set_y1 (ArdourCanvas::COORD_MAX);
+ _track_canvas_item->set_ignore_events (true);
+ _current_frame = 1; /* force redraw at 0 */
+}
+
+EditorCursor::~EditorCursor ()
+{
+ delete _track_canvas_item;
}
void