clean up item event handling in MidiRegionViews by removing unnecessary InteractiveItem inheritance, and keep child->parent event handling order consistent as much as possible

git-svn-id: svn://localhost/ardour2/branches/3.0@7186 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-28 16:37:04 +00:00
parent 3d6493abc9
commit 3e966771d0
11 changed files with 130 additions and 187 deletions

View file

@ -9,14 +9,26 @@ using namespace ARDOUR;
namespace Gnome {
namespace Canvas {
CanvasHit::CanvasHit (MidiRegionView& region,
Group& group,
double size,
const boost::shared_ptr<NoteType> note,
bool with_events)
: Diamond(group, size)
, CanvasNoteEvent(region, this, note)
{
if (with_events) {
signal_event().connect (sigc::mem_fun (*this, &CanvasHit::on_event));
}
}
bool
CanvasHit::on_event(GdkEvent* ev)
{
if (!_region.get_trackview().editor().canvas_note_event (ev, this)) {
return CanvasNoteEvent::on_event (ev);
} else {
return true;
}
if (!CanvasNoteEvent::on_event (ev)) {
return _region.get_trackview().editor().canvas_note_event (ev, this);
}
return true;
}
void