order = nth;
if (y_position != y) {
- /* the coordinates used here are in the system of the
- item's parent ...
- */
-
- Group* pg;
- double ix1, iy1, ix2, iy2;
- canvas_display->get_bounds (ix1, iy1, ix2, iy2);
- iy1 += editor.get_trackview_group_vertical_offset ();
- pg = canvas_display->property_parent();
- pg->i2w (ix1, iy1);
-
- if (iy1 < 0) {
- iy1 = 0;
- }
-
- canvas_display->move (0.0, y - iy1);
-
+ canvas_display->property_y () = y;
+ canvas_display->move (0.0, 0.0);
y_position = y;
}
+
canvas_display->raise_to_top ();
if (_marked_for_display) {
- canvas_display->show();
controls_hbox.show ();
controls_ebox.show ();
}
return effective_height;
}
+void
+TimeAxisView::clip_to_viewport ()
+{
+ if (_marked_for_display) {
+ if (y_position + effective_height < editor.get_trackview_group_vertical_offset () || y_position > editor.get_trackview_group_vertical_offset () + canvas_display->get_canvas()->get_height()) {
+ canvas_display->hide ();
+ return;
+ }
+ canvas_display->show ();
+ }
+ return;
+}
+
bool
TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
{
snprintf (buf, sizeof(buf), "%u", height);
node->add_property ("height", buf);
- node->add_property ("marked_for_display", (_marked_for_display ? "1" : "0"));
+ node->add_property ("marked-for-display", (_marked_for_display ? "1" : "0"));
return *node;
}
{
const XMLProperty *prop;
- if ((prop = node.property ("marked_for_display")) != 0) {
+ if ((prop = node.property ("marked-for-display")) != 0) {
_marked_for_display = (prop->value() == "1");
}
- if ((prop = node.property ("track_height")) != 0) {
+ if ((prop = node.property ("track-height")) != 0) {
if (prop->value() == "largest") {
set_height (hLargest);
return 0;
}
- cerr << name() << " check for " << y << " within " << y_position << " and + " << height << endl;
-
if (y_position <= y && y < (y_position + height)) {
return this;
}