mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
lollis: use layering to enable editing of overlapping regions
This commit is contained in:
parent
f7176b411e
commit
1febe07480
2 changed files with 12 additions and 13 deletions
|
|
@ -3388,6 +3388,7 @@ MidiRegionView::change_note_length (NoteBase* event, Temporal::Beats t)
|
|||
void
|
||||
MidiRegionView::begin_drag_edit (std::string const & why)
|
||||
{
|
||||
trackview.editor().get_selection().set (this, true);
|
||||
start_note_diff_command (why);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,11 +72,6 @@ VelocityGhostRegion::~VelocityGhostRegion ()
|
|||
bool
|
||||
VelocityGhostRegion::base_event (GdkEvent* ev)
|
||||
{
|
||||
if (!selected) {
|
||||
/* eat event to prevent it passing up th the automation track */
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<NoteBase*> affected_lollis;
|
||||
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (&parent_rv);
|
||||
|
|
@ -219,16 +214,14 @@ VelocityGhostRegion::remove_note (NoteBase* nb)
|
|||
void
|
||||
VelocityGhostRegion::set_colors ()
|
||||
{
|
||||
base_rect->set_fill_color (UIConfiguration::instance().color_mod ("ghost track base", "ghost track midi fill"));
|
||||
if (selected) {
|
||||
base_rect->set_fill_color (UIConfiguration::instance().color ("ghost track base"));
|
||||
} else {
|
||||
base_rect->set_fill_color (UIConfiguration::instance().color_mod ("ghost track base", "ghost track midi fill"));
|
||||
}
|
||||
|
||||
for (auto & gev : events) {
|
||||
if (selected) {
|
||||
gev.second->item->set_fill_color (gev.second->event->base_color());
|
||||
gev.second->item->set_ignore_events (false);
|
||||
} else {
|
||||
gev.second->item->set_fill_color (UIConfiguration::instance().color ("ghost track wave"));
|
||||
gev.second->item->set_ignore_events (true);
|
||||
}
|
||||
gev.second->item->set_fill_color (gev.second->event->base_color());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -384,4 +377,9 @@ VelocityGhostRegion::set_selected (bool yn)
|
|||
{
|
||||
selected = yn;
|
||||
set_colors ();
|
||||
|
||||
if (yn) {
|
||||
std::cerr << parent_rv.get_item_name() << " raise to top\n";
|
||||
group->raise_to_top ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue