diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-03-13 11:02:06 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-03-13 11:02:06 -0400 |
commit | f48b5568883468e70a751ec1aa934e5a55bb7705 (patch) | |
tree | 36c2f7082f628007dc53fadc5bb1920d29d4ab99 /gtk2_ardour/hit.cc | |
parent | c04081681cbfd33b66947e63388bbcd737441887 (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.cc | 7 |
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 |