mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
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:
parent
3d6493abc9
commit
3e966771d0
11 changed files with 130 additions and 187 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue