summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_cursors.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-12 15:13:11 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-12 15:13:11 -0500
commit937cb4fd2b0c5e9e8e4d883f31f7c4dd2bb2ac08 (patch)
treea9fc688c0f6889e5933357cb8d18ba0c1d71dd2e /gtk2_ardour/editor_cursors.h
parent8f930477be9e2c88859a8ea30b213fba3f7fc443 (diff)
convert canvas items that compose the playhead (EditorCursor, more generally) to pointers, since canvas items are owned by the group they belong to. This avoids a double-free during deletion
Diffstat (limited to 'gtk2_ardour/editor_cursors.h')
-rw-r--r--gtk2_ardour/editor_cursors.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_cursors.h b/gtk2_ardour/editor_cursors.h
index 93689c6e7b..4a2d20e8f8 100644
--- a/gtk2_ardour/editor_cursors.h
+++ b/gtk2_ardour/editor_cursors.h
@@ -42,19 +42,19 @@ class EditorCursor {
}
ArdourCanvas::Line& track_canvas_item () {
- return _track_canvas_item;
+ return *_track_canvas_item;
}
ArdourCanvas::Arrow& time_bar_canvas_item () {
- return _time_bars_canvas_item;
+ return *_time_bars_canvas_item;
}
PBD::Signal1<void, framepos_t> PositionChanged;
private:
Editor& _editor;
- ArdourCanvas::Arrow _time_bars_canvas_item;
- ArdourCanvas::Line _track_canvas_item;
+ ArdourCanvas::Arrow* _time_bars_canvas_item;
+ ArdourCanvas::Line* _track_canvas_item;
framepos_t _current_frame;
double _length;
};