using namespace PBD;
using namespace Gnome; // for Canvas
+PBD::Signal1<void, ControlPoint *> ControlPoint::CatchDeletion;
+
ControlPoint::ControlPoint (AutomationLine& al)
: _line (al)
{
_y = 0;
_shape = Full;
_size = 4.0;
- _selected = false;
_item = new Canvas::SimpleRect (_line.canvas_group());
_item->property_draw() = true;
_y = other._y;
_shape = other._shape;
_size = other._size;
- _selected = false;
_item = new Canvas::SimpleRect (_line.canvas_group());
_item->property_fill() = false;
ControlPoint::~ControlPoint ()
{
+ CatchDeletion (this); /* EMIT SIGNAL */
+
delete _item;
}
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);