Tempo ramps - remove double calls to RegionView::set_duration() and MidiRegionView::redisplay_model()

- massively improves note redrawing performance when dragging tempos
	  and audio-locked meters,
This commit is contained in:
nick_m 2016-03-20 21:57:44 +11:00
parent 9def5caeaf
commit e82c997b3d
2 changed files with 2 additions and 9 deletions

View file

@ -1401,15 +1401,12 @@ MidiRegionView::~MidiRegionView ()
void void
MidiRegionView::region_resized (const PropertyChange& what_changed) MidiRegionView::region_resized (const PropertyChange& what_changed)
{ {
RegionView::region_resized(what_changed); RegionView::region_resized(what_changed); // calls RegionView::set_duration()
if (what_changed.contains (ARDOUR::Properties::position)) { if (what_changed.contains (ARDOUR::Properties::position)) {
_region_relative_time_converter.set_origin_b(_region->position()); _region_relative_time_converter.set_origin_b(_region->position());
_region_relative_time_converter_double.set_origin_b(_region->position()); _region_relative_time_converter_double.set_origin_b(_region->position());
set_duration(_region->length(), 0); /* reset_width dependent_items() redisplays model */
if (_enable_display) {
redisplay_model();
}
} }
if (what_changed.contains (ARDOUR::Properties::start) || if (what_changed.contains (ARDOUR::Properties::start) ||

View file

@ -381,10 +381,6 @@ RegionView::region_changed (const PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::locked)) { if (what_changed.contains (ARDOUR::Properties::locked)) {
region_locked (); region_locked ();
} }
if (what_changed.contains (ARDOUR::Properties::locked)) {
/* name will show locked status */
region_renamed ();
}
} }
void void