mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid. Lots of naming changes. Multiple simultaneous snap options allowed. Grid is one of the possible Snap options. Grid uses the same data as the rulers. Replace complicated tempo_lines with simple grid_lines. The Grid is zoom-scale-sensitive along with the rulers. If you are zoomed out, grid becomes coarser.
This commit is contained in:
parent
d6eb1c826f
commit
dc61256466
32 changed files with 959 additions and 1360 deletions
|
|
@ -306,7 +306,7 @@ Editor::track_canvas_viewport_size_allocated ()
|
|||
}
|
||||
|
||||
update_fixed_rulers();
|
||||
redisplay_tempo (false);
|
||||
redisplay_grid (false);
|
||||
_summary->set_overlays_dirty ();
|
||||
}
|
||||
|
||||
|
|
@ -1044,7 +1044,7 @@ Editor::color_handler()
|
|||
_track_canvas->queue_draw ();
|
||||
|
||||
/*
|
||||
redisplay_tempo (true);
|
||||
redisplay_grid (true);
|
||||
|
||||
if (_session)
|
||||
_session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks); // redraw metric markers
|
||||
|
|
@ -1148,26 +1148,6 @@ Editor::pop_canvas_cursor ()
|
|||
}
|
||||
}
|
||||
|
||||
Gdk::Cursor*
|
||||
Editor::which_grabber_cursor () const
|
||||
{
|
||||
Gdk::Cursor* c = _cursors->grabber;
|
||||
|
||||
switch (_edit_point) {
|
||||
case EditAtMouse:
|
||||
c = _cursors->grabber_edit_point;
|
||||
break;
|
||||
default:
|
||||
boost::shared_ptr<Movable> m = _movable.lock();
|
||||
if (m && m->locked()) {
|
||||
c = _cursors->speaker;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
Gdk::Cursor*
|
||||
Editor::which_trim_cursor (bool left) const
|
||||
{
|
||||
|
|
@ -1267,7 +1247,7 @@ Editor::which_track_cursor () const
|
|||
switch (_join_object_range_state) {
|
||||
case JOIN_OBJECT_RANGE_NONE:
|
||||
case JOIN_OBJECT_RANGE_OBJECT:
|
||||
cursor = which_grabber_cursor ();
|
||||
cursor = _cursors->grabber;
|
||||
break;
|
||||
case JOIN_OBJECT_RANGE_RANGE:
|
||||
cursor = _cursors->selector;
|
||||
|
|
@ -1314,14 +1294,7 @@ Editor::which_canvas_cursor(ItemType type) const
|
|||
cursor = which_track_cursor ();
|
||||
break;
|
||||
case PlayheadCursorItem:
|
||||
switch (_edit_point) {
|
||||
case EditAtMouse:
|
||||
cursor = _cursors->grabber_edit_point;
|
||||
break;
|
||||
default:
|
||||
cursor = _cursors->grabber;
|
||||
break;
|
||||
}
|
||||
cursor = _cursors->grabber;
|
||||
break;
|
||||
case SelectionItem:
|
||||
cursor = _cursors->selector;
|
||||
|
|
@ -1431,7 +1404,7 @@ Editor::which_canvas_cursor(ItemType type) const
|
|||
case VideoBarItem:
|
||||
case TransportMarkerBarItem:
|
||||
case DropZoneItem:
|
||||
cursor = which_grabber_cursor();
|
||||
cursor = _cursors->grabber;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue