13
0

do not use Item::move() when dragging notes since this resets the Item's position in its group, rather than its coordinates.

This fixes the double-distance/wrongly drawn location of MIDI notes after a drag
This commit is contained in:
Paul Davis 2014-03-13 11:02:06 -04:00
parent c04081681c
commit f48b556888
2 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,12 @@ Hit::~Hit ()
void
Hit::move_event (double dx, double dy)
{
_polygon->move (Duple (dx, dy));
Points points = _polygon->get();
Points moved;
for (Points::iterator p = points.begin(); p != points.end(); ++p) {
moved.push_back ((*p).translate (ArdourCanvas::Duple (dx, dy)));
}
_polygon->set (moved);
}
void

View File

@ -47,7 +47,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