Quick fix to get trim working again (bahaving oddly during trim right now)
This commit is contained in:
parent
32a579ec28
commit
7a6efaaf3d
@ -1410,12 +1410,17 @@ MidiRegionView::region_resized (const PropertyChange& what_changed)
|
||||
_region_relative_time_converter.set_origin_b(_region->position());
|
||||
_region_relative_time_converter_double.set_origin_b(_region->position());
|
||||
/* reset_width dependent_items() redisplays model */
|
||||
|
||||
}
|
||||
|
||||
if (what_changed.contains (ARDOUR::Properties::start) ||
|
||||
what_changed.contains (ARDOUR::Properties::position)) {
|
||||
_source_relative_time_converter.set_origin_b (_region->position() - _region->start());
|
||||
}
|
||||
if (what_changed.contains (ARDOUR::Properties::length)) {
|
||||
enable_display (true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -1754,8 +1759,9 @@ MidiRegionView::update_sustained (Note* ev, bool update_ghost_regions)
|
||||
}
|
||||
|
||||
// Update color in case velocity has changed
|
||||
//ev->set_fill_color(ev->base_color());
|
||||
//ev->set_outline_color(ev->calculate_outline(ev->base_color(), ev->selected()));
|
||||
const uint32_t base_col = ev->base_color();
|
||||
ev->set_fill_color(base_col);
|
||||
ev->set_outline_color(ev->calculate_outline(base_col, ev->selected()));
|
||||
|
||||
if (update_ghost_regions) {
|
||||
for (std::vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
|
@ -107,7 +107,7 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t
|
||||
, _start_beats (Properties::start_beats, Evoral::Beats())
|
||||
, _length_beats (Properties::length_beats, other->_length_beats)
|
||||
{
|
||||
_start_beats = Evoral::Beats (_session.tempo_map().exact_beat_at_frame (other->_position + offset - other->_start, sub_num) - other->beat());
|
||||
_start_beats = Evoral::Beats (_session.tempo_map().exact_beat_at_frame ((other->_position + offset), sub_num) - other->beat()) + other->_start_beats;
|
||||
update_length_beats (sub_num);
|
||||
register_properties ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user