mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Consolidate ToggleAction cast, use new API
Furthermore we can assume that all Actions are registered and Unregistered actions will ::abort() execution.
This commit is contained in:
parent
00934aec0d
commit
8244026533
9 changed files with 91 additions and 233 deletions
|
|
@ -941,14 +941,10 @@ ARDOUR_UI::editor_meter_peak_button_release (GdkEventButton* ev)
|
|||
void
|
||||
ARDOUR_UI::toggle_mixer_space()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalMixer");
|
||||
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active()) {
|
||||
mixer->maximise_mixer_space ();
|
||||
} else {
|
||||
mixer->restore_mixer_space ();
|
||||
}
|
||||
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action ("Common", "ToggleMaximalMixer");
|
||||
if (tact->get_active()) {
|
||||
mixer->maximise_mixer_space ();
|
||||
} else {
|
||||
mixer->restore_mixer_space ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue