reset_region_scale_amplitude is redundant with reset_region_gain
This commit is contained in:
parent
62fd8ecd35
commit
764aa75f09
|
@ -1362,7 +1362,6 @@ private:
|
||||||
void reverse_region ();
|
void reverse_region ();
|
||||||
void strip_region_silence ();
|
void strip_region_silence ();
|
||||||
void normalize_region ();
|
void normalize_region ();
|
||||||
void reset_region_scale_amplitude ();
|
|
||||||
void adjust_region_gain (bool up);
|
void adjust_region_gain (bool up);
|
||||||
void reset_region_gain ();
|
void reset_region_gain ();
|
||||||
void quantize_region ();
|
void quantize_region ();
|
||||||
|
|
|
@ -1882,7 +1882,6 @@ Editor::register_region_actions ()
|
||||||
register_region_action (_region_actions, RegionActionTarget (SelectedRegions), "spectral-analyze-region", _("Spectral Analysis..."), sigc::mem_fun (*this, &Editor::spectral_analyze_region_selection));
|
register_region_action (_region_actions, RegionActionTarget (SelectedRegions), "spectral-analyze-region", _("Spectral Analysis..."), sigc::mem_fun (*this, &Editor::spectral_analyze_region_selection));
|
||||||
|
|
||||||
register_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "reset-region-gain-envelopes", _("Reset Envelope"), sigc::mem_fun (*this, &Editor::reset_region_gain_envelopes));
|
register_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "reset-region-gain-envelopes", _("Reset Envelope"), sigc::mem_fun (*this, &Editor::reset_region_gain_envelopes));
|
||||||
register_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "reset-region-scale-amplitude", _("Reset Gain"), sigc::mem_fun (*this, &Editor::reset_region_scale_amplitude));
|
|
||||||
|
|
||||||
register_toggle_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "toggle-region-gain-envelope-active", _("Envelope Active"), sigc::mem_fun (*this, &Editor::toggle_gain_envelope_active));
|
register_toggle_region_action (_region_actions, RegionActionTarget (SelectedRegions|EnteredRegions), "toggle-region-gain-envelope-active", _("Envelope Active"), sigc::mem_fun (*this, &Editor::toggle_gain_envelope_active));
|
||||||
|
|
||||||
|
|
|
@ -5688,41 +5688,6 @@ Editor::normalize_region ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::reset_region_scale_amplitude ()
|
|
||||||
{
|
|
||||||
if (!_session) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RegionSelection rs = get_regions_from_selection_and_entered ();
|
|
||||||
|
|
||||||
if (rs.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool in_command = false;
|
|
||||||
|
|
||||||
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
|
|
||||||
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*r);
|
|
||||||
if (!arv)
|
|
||||||
continue;
|
|
||||||
arv->region()->clear_changes ();
|
|
||||||
arv->audio_region()->set_scale_amplitude (1.0f);
|
|
||||||
|
|
||||||
if(!in_command) {
|
|
||||||
begin_reversible_command ("reset gain");
|
|
||||||
in_command = true;
|
|
||||||
}
|
|
||||||
_session->add_command (new StatefulDiffCommand (arv->region()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in_command) {
|
|
||||||
commit_reversible_command ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::adjust_region_gain (bool up)
|
Editor::adjust_region_gain (bool up)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1576,7 +1576,7 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!have_non_unity_scale_amplitude || !have_audio) {
|
if (!have_non_unity_scale_amplitude || !have_audio) {
|
||||||
_region_actions->get_action("reset-region-scale-amplitude")->set_sensitive (false);
|
_region_actions->get_action("reset-region-gain")->set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::RefPtr<ToggleAction> a = Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-lock"));
|
Glib::RefPtr<ToggleAction> a = Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-lock"));
|
||||||
|
|
Loading…
Reference in New Issue