summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-01-12 03:56:43 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-01-12 03:56:43 +0000
commit51c333a7b3abe11dbe5c20234d92eb1ff16a30bb (patch)
tree0b4e8cf6ea570db44250151e1345714ecd790b03 /gtk2_ardour/editor_canvas.cc
parent11faee330755fea81e051d064ca2d345db9eaf42 (diff)
more NSD madness curing; fix up canvas range rects and marker line height mgmt
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2902 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc56
1 files changed, 45 insertions, 11 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 4e8858b84c..c89c196a88 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -317,25 +317,27 @@ Editor::track_canvas_size_allocated ()
reset_scrolling_region ();
if (playhead_cursor) playhead_cursor->set_length (canvas_height);
+
+ double y1 = vertical_adjustment.get_value ();
for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
- (*x)->set_line_length (full_canvas_height);
+ (*x)->set_line_vpos (y1, canvas_height);
}
- range_marker_drag_rect->property_y2() = full_canvas_height;
- transport_loop_range_rect->property_y2() = full_canvas_height;
- transport_punch_range_rect->property_y2() = full_canvas_height;
- transport_punchin_line->property_y2() = full_canvas_height;
- transport_punchout_line->property_y2() = full_canvas_height;
+ range_marker_drag_rect->property_y1() = y1;
+ range_marker_drag_rect->property_y2() = y1 + canvas_height;
+ transport_loop_range_rect->property_y1() = y1;
+ transport_loop_range_rect->property_y2() = y1 + canvas_height;
+ transport_punch_range_rect->property_y1() = y1;
+ transport_punch_range_rect->property_y2() = y1 + canvas_height;
+ transport_punchin_line->property_y1() = y1;
+ transport_punchin_line->property_y2() = y1 + canvas_height;
+ transport_punchout_line->property_y1() = y1;
+ transport_punchout_line->property_y2() = y1 + canvas_height;
update_fixed_rulers();
redisplay_tempo (true);
- if (logo_item) {
- // logo_item->property_height() = full_canvas_height;
- // logo_item->property_width() = canvas_width;
- }
-
Resized (); /* EMIT_SIGNAL */
return false;
@@ -682,6 +684,38 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
return FALSE;
}
+void
+Editor::tie_vertical_scrolling ()
+{
+ double y1 = vertical_adjustment.get_value();
+
+ playhead_cursor->set_y_axis (y1);
+
+ range_marker_drag_rect->property_y1() = y1;
+ range_marker_drag_rect->property_y2() = y1 + canvas_height;
+ transport_loop_range_rect->property_y1() = y1;
+ transport_loop_range_rect->property_y2() = y1 + canvas_height;
+ transport_punch_range_rect->property_y1() = y1;
+ transport_punch_range_rect->property_y2() = y1 + canvas_height;
+ transport_punchin_line->property_y1() = y1;
+ transport_punchin_line->property_y2() = y1 + canvas_height;
+ transport_punchout_line->property_y1() = y1;
+ transport_punchout_line->property_y2() = y1 + canvas_height;
+
+ if (!selection->markers.empty()) {
+ for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
+ (*x)->set_line_vpos (y1, canvas_height);
+ }
+ }
+
+ if (logo_item) {
+ logo_item->property_y() = y1;
+ }
+
+ /* this will do an immediate redraw */
+
+ controls_layout.get_vadjustment()->set_value (y1);
+}
void
Editor::canvas_horizontally_scrolled ()