+ ArdourCanvas::Rectangle* rect = NULL;
+ if ((rect = dynamic_cast<ArdourCanvas::Rectangle*>(ev->item))) {
+ rect->set (ArdourCanvas::Rect (note->x0(), rect->y0(), note->x1(), rect->y1()));
+ }
+}
+/** Update the x positions of our representation of a parent's hit.
+ * @param hit The CanvasHit from the parent MidiRegionView.
+ */
+void
+MidiGhostRegion::update_hit (Hit* hit)
+{
+ GhostEvent* ev = find_event (hit);
+ if (!ev) {
+ return;
+ }
+
+ ArdourCanvas::Polygon* poly = NULL;
+ if ((poly = dynamic_cast<ArdourCanvas::Polygon*>(ev->item))) {
+ ArdourCanvas::Duple ppos = hit->position();
+ ArdourCanvas::Duple gpos = poly->position();
+ gpos.x = ppos.x;
+ poly->set_position(gpos);
+ }