Make layer menu items apply to the selection.
[ardour.git] / gtk2_ardour / control_point.cc
index f40a809a4a1fe1a7fa860c080c36838b3f4bb269..801bd5bb82e073985a2c7e955d3482c77b50b1b4 100644 (file)
@@ -40,7 +40,6 @@ ControlPoint::ControlPoint (AutomationLine& al)
        _y = 0;
        _shape = Full;
        _size = 4.0;
-       _selected = false;
 
        _item = new Canvas::SimpleRect (_line.canvas_group());
        _item->property_draw() = true;
@@ -69,7 +68,6 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force
        _y = other._y;
        _shape = other._shape;
        _size = other._size;
-       _selected = false;
 
        _item = new Canvas::SimpleRect (_line.canvas_group());
        _item->property_fill() = false;
@@ -120,6 +118,14 @@ ControlPoint::visible () const
 void
 ControlPoint::reset (double x, double y, AutomationList::iterator mi, uint32_t vi, ShapeType shape)
 {
+       /* If this is too big, libart will confuse itself and segfault after it casts the bounding box
+          of this automation line to ints.  Sigh.
+       */
+       
+       if (x > INT32_MAX) {
+               x = INT32_MAX;
+       }
+       
        _model = mi;
        _view_index = vi;
        move_to (x, y, shape);