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:
parent
c04081681c
commit
f48b556888
@ -47,7 +47,12 @@ Hit::~Hit ()
|
|||||||
void
|
void
|
||||||
Hit::move_event (double dx, double dy)
|
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
|
void
|
||||||
|
@ -47,7 +47,7 @@ Note::~Note ()
|
|||||||
void
|
void
|
||||||
Note::move_event (double dx, double dy)
|
Note::move_event (double dx, double dy)
|
||||||
{
|
{
|
||||||
_rectangle->move (Duple (dx, dy));
|
_rectangle->set (_rectangle->get().translate (Duple (dx, dy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Coord
|
Coord
|
||||||
|
Loading…
Reference in New Issue
Block a user