X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Fghostregion.cc;h=ef0e020dcfc88039aa34db0b442b2112ac2eb749;hb=bc38f2c48969be068b93525bdbcce6c1ff4e1d7c;hp=fc66b1564d612f548a3a4c6c00cbaa1a4c73b050;hpb=3c1bc99df936a2ea1ea11ef6c884b9eecaef5c09;p=ardour.git diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index fc66b1564d..ef0e020dcf 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -349,8 +349,7 @@ MidiGhostRegion::add_note (NoteBase* n) ArdourCanvas::Rectangle* rect = NULL; ArdourCanvas::Polygon* poly = NULL; if ((rect = dynamic_cast(event->item))) { - rect->set_y0 (y); - rect->set_y1 (y + h); + rect->set (ArdourCanvas::Rect (rect->x0(), y, rect->x1(), y + h)); } else if ((poly = dynamic_cast(event->item))) { Duple position = poly->position(); position.y = y; @@ -389,10 +388,7 @@ MidiGhostRegion::update_note (NoteBase* parent) ArdourCanvas::Polygon* poly = NULL; if ((note = dynamic_cast(parent))) { if ((rect = dynamic_cast(ev->item))) { - double const x1 = parent->x0 (); - double const x2 = parent->x1 (); - rect->set_x0 (x1); - rect->set_x1 (x2); + rect->set (ArdourCanvas::Rect (parent->x0(), rect->y0(), parent->x1(), rect->y1())); } } else if ((hit = dynamic_cast(parent))) { if ((poly = dynamic_cast(ev->item))) {