diff options
author | Doug McLain <doug@nostar.net> | 2007-03-12 21:34:39 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-03-12 21:34:39 +0000 |
commit | 4abb00bceb2bd0b842f25484633d20e171d3eb41 (patch) | |
tree | 794691ac0d52c4ae763ad5cee9629983824a780f | |
parent | f22d960879b3fd81e683232a0ace94b7147a715c (diff) |
Added error checking for cursor colors
git-svn-id: svn://localhost/ardour2/trunk@1579 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 4538a3d0ee..7ba5e616ff 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -263,6 +263,16 @@ Editor::initialize_canvas () double time_width = FLT_MAX/frames_per_unit; time_canvas.set_scroll_region(0.0, 0.0, time_width, time_height); + if (!color_map[cEditCursor]) { + warning << _("edit cursor color not defined, check your ardour.colors file!") << endmsg; + color_map[cEditCursor] = RGBA_TO_UINT (30,30,30,255); + } + + if (!color_map[cPlayHead]) { + warning << _("playhead color not defined, check your ardour.colors file!") << endmsg; + color_map[cPlayHead] = RGBA_TO_UINT (0,0,0,255); + } + edit_cursor = new Cursor (*this, &Editor::canvas_edit_cursor_event); edit_cursor->canvas_item.property_fill_color_rgba() = color_map[cEditCursor]; playhead_cursor = new Cursor (*this, &Editor::canvas_playhead_cursor_event); |