mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Fix gain menu (polarity, envelope) with multiple selection
This commit is contained in:
parent
0f949bc02b
commit
bd3f713d0e
1 changed files with 14 additions and 7 deletions
|
|
@ -1512,8 +1512,11 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing)
|
|||
have_inactive_fade_out = true;
|
||||
}
|
||||
|
||||
have_inverted_polarity = ar->scale_amplitude () < 0;
|
||||
have_non_inverted_polarity = ar->scale_amplitude () >= 0;
|
||||
if (ar->scale_amplitude () < 0) {
|
||||
have_inverted_polarity = true;
|
||||
} else {
|
||||
have_non_inverted_polarity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1564,14 +1567,18 @@ Editor::sensitize_the_right_region_actions (bool because_canvas_crossing)
|
|||
|
||||
if (have_audio) {
|
||||
|
||||
if (have_envelope_active && !have_envelope_inactive) {
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_active ();
|
||||
if (have_envelope_active != have_envelope_inactive) {
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_active (have_envelope_active);
|
||||
} else if (have_envelope_active && have_envelope_inactive) {
|
||||
// Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_inconsistent ();
|
||||
// Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_inconsistent (); // N/A
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-gain-envelope-active"))->set_sensitive (false);
|
||||
}
|
||||
|
||||
if (have_inverted_polarity && !have_non_inverted_polarity) {
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-polarity"))->set_active ();
|
||||
if (have_inverted_polarity != have_non_inverted_polarity) {
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-polarity"))->set_active (have_inverted_polarity);
|
||||
} else if (have_inverted_polarity && have_non_inverted_polarity) {
|
||||
// Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-polarity"))->set_inconsistent (); // N/A
|
||||
Glib::RefPtr<ToggleAction>::cast_dynamic (_region_actions->get_action("toggle-region-polarity"))->set_sensitive (false);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue