13
0

suffix region gain to TAVitem name

This commit is contained in:
Robin Gareus 2017-01-24 13:37:20 +01:00
parent 8dedea5ffa
commit 47de9314cc

View File

@ -378,6 +378,7 @@ AudioRegionView::region_scale_amplitude_changed ()
for (uint32_t n = 0; n < waves.size(); ++n) {
waves[n]->gain_changed ();
}
region_renamed ();
}
void
@ -393,6 +394,14 @@ AudioRegionView::region_renamed ()
str = string ("!") + str;
}
boost::shared_ptr<AudioRegion> ar (audio_region());
if (ar->scale_amplitude() != 1.0) {
char tmp[32];
snprintf (tmp, 32, " (%.1fdB)", accurate_coefficient_to_dB (ar->scale_amplitude()));
str += tmp;
}
set_item_name (str, this);
set_name_text (str);
}