X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fnote.cc;h=6e1878afc0651c23b3d7bba5b34288693202185f;hb=7ad62ffbedb360260fd706b47849224b2e26ef6d;hp=02475f859c733c3b080691d7ba0a3efe6342247d;hpb=c10896e984c4e7532920815fbb20fc9c7467aea8;p=ardour.git diff --git a/gtk2_ardour/note.cc b/gtk2_ardour/note.cc index 02475f859c..6e1878afc0 100644 --- a/gtk2_ardour/note.cc +++ b/gtk2_ardour/note.cc @@ -24,16 +24,15 @@ #include "canvas/debug.h" #include "note.h" -#include "midi_region_view.h" #include "public_editor.h" using namespace ARDOUR; using namespace ArdourCanvas; Note::Note ( - MidiRegionView& region, Group* group, const boost::shared_ptr note, bool with_events) + MidiRegionView& region, Item* parent, const boost::shared_ptr note, bool with_events) : NoteBase (region, with_events, note) - , _rectangle (new ArdourCanvas::Rectangle (group)) + , _rectangle (new ArdourCanvas::Rectangle (parent)) { CANVAS_DEBUG_NAME (_rectangle, "note"); set_item (_rectangle); @@ -47,7 +46,7 @@ Note::~Note () void Note::move_event (double dx, double dy) { - _rectangle->move (Duple (dx, dy)); + _rectangle->set (_rectangle->get().translate (Duple (dx, dy))); } Coord @@ -98,6 +97,12 @@ Note::hide () _rectangle->hide (); } +void +Note::set (ArdourCanvas::Rect rect) +{ + _rectangle->set (rect); +} + void Note::set_x0 (Coord x0) {