projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
son't try to select non-existent notes after editing (and thus crash).
[ardour.git]
/
gtk2_ardour
/
note.cc
diff --git
a/gtk2_ardour/note.cc
b/gtk2_ardour/note.cc
index 30149866c006305b73b389bb2e951b587d8fbd7c..6e1878afc0651c23b3d7bba5b34288693202185f 100644
(file)
--- a/
gtk2_ardour/note.cc
+++ b/
gtk2_ardour/note.cc
@@
-24,16
+24,15
@@
#include "canvas/debug.h"
#include "note.h"
#include "canvas/debug.h"
#include "note.h"
-#include "midi_region_view.h"
#include "public_editor.h"
using namespace ARDOUR;
using namespace ArdourCanvas;
Note::Note (
#include "public_editor.h"
using namespace ARDOUR;
using namespace ArdourCanvas;
Note::Note (
- MidiRegionView& region,
Group* group
, const boost::shared_ptr<NoteType> note, bool with_events)
+ MidiRegionView& region,
Item* parent
, const boost::shared_ptr<NoteType> note, bool with_events)
: NoteBase (region, with_events, note)
: NoteBase (region, with_events, note)
- , _rectangle (new ArdourCanvas::Rectangle (
group
))
+ , _rectangle (new ArdourCanvas::Rectangle (
parent
))
{
CANVAS_DEBUG_NAME (_rectangle, "note");
set_item (_rectangle);
{
CANVAS_DEBUG_NAME (_rectangle, "note");
set_item (_rectangle);
@@
-47,7
+46,7
@@
Note::~Note ()
void
Note::move_event (double dx, double dy)
{
void
Note::move_event (double dx, double dy)
{
- _rectangle->
move (Duple (dx, dy
));
+ _rectangle->
set (_rectangle->get().translate (Duple (dx, dy)
));
}
Coord
}
Coord
@@
-98,6
+97,12
@@
Note::hide ()
_rectangle->hide ();
}
_rectangle->hide ();
}
+void
+Note::set (ArdourCanvas::Rect rect)
+{
+ _rectangle->set (rect);
+}
+
void
Note::set_x0 (Coord x0)
{
void
Note::set_x0 (Coord x0)
{
@@
-123,11
+128,17
@@
Note::set_y1 (Coord y1)
}
void
}
void
-Note::set_outline_what (
in
t what)
+Note::set_outline_what (
ArdourCanvas::Rectangle::Wha
t what)
{
_rectangle->set_outline_what (what);
}
{
_rectangle->set_outline_what (what);
}
+void
+Note::set_outline_all ()
+{
+ _rectangle->set_outline_all ();
+}
+
void
Note::set_ignore_events (bool ignore)
{
void
Note::set_ignore_events (bool ignore)
{