changes to help strp silence
[ardour.git] / gtk2_ardour / canvas-note.cc
1 #include "canvas-note.h"
2 #include "midi_region_view.h"
3 #include "public_editor.h"
4 #include "evoral/Note.hpp"
5
6 using namespace ARDOUR;
7
8 namespace Gnome {
9 namespace Canvas {
10
11 bool
12 CanvasNote::on_event(GdkEvent* ev)
13 {
14         if (!_region.get_trackview().editor().canvas_note_event (ev, this)) {
15                 return CanvasNoteEvent::on_event (ev);
16         } else {
17                 return true;
18         }
19 }
20
21 void
22 CanvasNote::move_event(double dx, double dy)
23 {
24         property_x1() = property_x1() + dx;
25         property_y1() = property_y1() + dy;
26         property_x2() = property_x2() + dx;
27         property_y2() = property_y2() + dy;
28
29         if (_text) {
30                 _text->hide();
31                 _text->property_x() = _text->property_x() + dx;
32                 _text->property_y() = _text->property_y() + dy;
33                 _text->show();
34         }
35 }
36
37
38 } // namespace Gnome
39 } // namespace Canvas