Relax A5 style exclusive In/Disk monitoring
This allows "All In" and "All Disk" to be selected simultaneously.
This commit is contained in:
parent
dfffec9b58
commit
68d26ffee9
@ -140,37 +140,35 @@ void
|
|||||||
ARDOUR_UI::toggle_session_monitoring_in ()
|
ARDOUR_UI::toggle_session_monitoring_in ()
|
||||||
{
|
{
|
||||||
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
|
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||||
|
MonitorChoice mc = _session->config.get_session_monitoring ();
|
||||||
|
|
||||||
if (tact->get_active() && _session->config.get_session_monitoring () == MonitorInput) {
|
if (tact->get_active() == (0 != (mc & MonitorInput))) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorInput) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tact->get_active()) {
|
if (tact->get_active()) {
|
||||||
_session->config.set_session_monitoring (MonitorInput);
|
mc = MonitorChoice (mc | MonitorInput);
|
||||||
} else {
|
} else {
|
||||||
_session->config.set_session_monitoring (MonitorAuto);
|
mc = MonitorChoice (mc & ~MonitorInput);
|
||||||
}
|
}
|
||||||
|
_session->config.set_session_monitoring (mc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_session_monitoring_disk ()
|
ARDOUR_UI::toggle_session_monitoring_disk ()
|
||||||
{
|
{
|
||||||
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
|
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||||
if (tact->get_active() && _session->config.get_session_monitoring () == MonitorDisk) {
|
MonitorChoice mc = _session->config.get_session_monitoring ();
|
||||||
return;
|
if (tact->get_active() == (0 != (mc & MonitorDisk))) {
|
||||||
}
|
|
||||||
if (!tact->get_active() && _session->config.get_session_monitoring () != MonitorDisk) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tact->get_active()) {
|
if (tact->get_active()) {
|
||||||
_session->config.set_session_monitoring (MonitorDisk);
|
mc = MonitorChoice (mc | MonitorDisk);
|
||||||
} else {
|
} else {
|
||||||
_session->config.set_session_monitoring (MonitorAuto);
|
mc = MonitorChoice (mc & ~MonitorDisk);
|
||||||
}
|
}
|
||||||
|
_session->config.set_session_monitoring (mc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -357,20 +355,9 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||||||
} else if (p == "session-monitoring") {
|
} else if (p == "session-monitoring") {
|
||||||
Glib::RefPtr<ToggleAction> tiact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
|
Glib::RefPtr<ToggleAction> tiact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||||
Glib::RefPtr<ToggleAction> tdact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
|
Glib::RefPtr<ToggleAction> tdact = ActionManager::get_toggle_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||||
switch (_session->config.get_session_monitoring ()) {
|
MonitorChoice mc = _session->config.get_session_monitoring ();
|
||||||
case MonitorDisk:
|
tiact->set_active (0 != (mc & MonitorInput));
|
||||||
tdact->set_active (true);
|
tdact->set_active (0 != (mc & MonitorDisk));
|
||||||
tiact->set_active (false);
|
|
||||||
break;
|
|
||||||
case MonitorInput:
|
|
||||||
tiact->set_active (true);
|
|
||||||
tdact->set_active (false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tdact->set_active (false);
|
|
||||||
tiact->set_active (false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (p == "punch-out") {
|
} else if (p == "punch-out") {
|
||||||
ActionManager::map_some_state ("Transport", "TogglePunchOut", sigc::mem_fun (_session->config, &SessionConfiguration::get_punch_out));
|
ActionManager::map_some_state ("Transport", "TogglePunchOut", sigc::mem_fun (_session->config, &SessionConfiguration::get_punch_out));
|
||||||
if (!_session->config.get_punch_out()) {
|
if (!_session->config.get_punch_out()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user