Clean up some confusion about offering a denormalize menu option when a region may not necessarily be normalized.

git-svn-id: svn://localhost/ardour2/branches/3.0@5649 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-09-09 16:39:33 +00:00
parent 3386070014
commit 58f5ad6406
3 changed files with 7 additions and 8 deletions

View File

@ -1815,10 +1815,9 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
items.push_back (SeparatorElem());
}
if (ar->scale_amplitude() != 1.0f) {
items.push_back (MenuElem (_("DeNormalize"), mem_fun(*this, &Editor::denormalize_region)));
} else {
items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region)));
items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region)));
if (ar->scale_amplitude() != 1) {
items.push_back (MenuElem (_("Reset Gain"), mem_fun(*this, &Editor::reset_region_scale_amplitude)));
}
} else if (mr) {
@ -1826,7 +1825,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
items.push_back (SeparatorElem());
}
items.push_back (MenuElem (_("Strip silence..."), mem_fun (*this, &Editor::strip_region_silence)));
items.push_back (MenuElem (_("Strip Silence..."), mem_fun (*this, &Editor::strip_region_silence)));
items.push_back (MenuElem (_("Reverse"), mem_fun(*this, &Editor::reverse_region)));
items.push_back (SeparatorElem());

View File

@ -1079,7 +1079,7 @@ class Editor : public PublicEditor
void strip_region_silence ();
void normalize_region ();
double _last_normalization_value;
void denormalize_region ();
void reset_region_scale_amplitude ();
void adjust_region_scale_amplitude (bool up);
void quantize_region ();

View File

@ -4687,7 +4687,7 @@ Editor::normalize_region ()
void
Editor::denormalize_region ()
Editor::reset_region_scale_amplitude ()
{
if (!session) {
return;
@ -4701,7 +4701,7 @@ Editor::denormalize_region ()
return;
}
begin_reversible_command ("denormalize");
begin_reversible_command ("reset gain");
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*r);