From f0f2e3bb713287a3e170ff6e9c8feb5b1b2188ca Mon Sep 17 00:00:00 2001 From: nick_m Date: Mon, 6 Jun 2016 14:26:43 +1000 Subject: Consolidate notifications when MidiRegion changes length due to position change. --- libs/ardour/region.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'libs/ardour/region.cc') diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 1b9793313d..105aa3af59 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -578,7 +578,19 @@ Region::set_position (framepos_t pos) /* do this even if the position is the same. this helps out a GUI that has moved its representation already. */ - send_change (Properties::position); + PropertyChange p_and_l; + + p_and_l.add (Properties::position); + /* Currently length change due to position change is only implemented + for MidiRegion (Region has no length in beats). + Notify a length change regardless (its more efficient for MidiRegions), + and when Region has a _length_beats we will need it here anyway). + */ + if (position_lock_style() == MusicTime) { + p_and_l.add (Properties::length); + } + + send_change (p_and_l); } -- cgit v1.2.3