summaryrefslogtreecommitdiff
path: root/gtk2_ardour/hit.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-13 11:02:06 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-13 11:02:06 -0400
commitf48b5568883468e70a751ec1aa934e5a55bb7705 (patch)
tree36c2f7082f628007dc53fadc5bb1920d29d4ab99 /gtk2_ardour/hit.cc
parentc04081681cbfd33b66947e63388bbcd737441887 (diff)
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
Diffstat (limited to 'gtk2_ardour/hit.cc')
-rw-r--r--gtk2_ardour/hit.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/hit.cc b/gtk2_ardour/hit.cc
index feb8ca43db..69dd8d5bc8 100644
--- a/gtk2_ardour/hit.cc
+++ b/gtk2_ardour/hit.cc
@@ -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