13
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Robin Gareus 6fe689098b
Merge branch 'ardour' 2024-05-13 23:12:03 +02:00
Robin Gareus caae3501ec
TransportMasterWidget may not have a session
Other parts in this dialog already test for session == nullptr.
This can happen in the Preferences, when switching a timecode
master w/o a session (not possible in Ardour, but some derivative
project).
2024-05-13 23:11:43 +02:00
Paul Davis c3eb30d96b action group names must not be translatable 2024-05-13 15:08:53 -06:00
2 changed files with 7 additions and 5 deletions

View File

@ -894,7 +894,7 @@ Editor::register_midi_actions ()
ActionManager::register_radio_action (length_actions, draw_length_group, X_("draw-length-bar"), grid_type_strings[(int)GridTypeBar].c_str(), (sigc::bind (sigc::mem_fun(*this, &Editor::draw_length_chosen), Editing::GridTypeBar)));
ActionManager::register_radio_action (length_actions, draw_length_group, X_("draw-length-auto"), _("Auto"), (sigc::bind (sigc::mem_fun(*this, &Editor::draw_length_chosen), DRAW_LEN_AUTO)));
Glib::RefPtr<ActionGroup> velocity_actions = ActionManager::create_action_group (midi_bindings, _("Draw Velocity"));
Glib::RefPtr<ActionGroup> velocity_actions = ActionManager::create_action_group (midi_bindings, X_("DrawVelocity"));
RadioAction::Group draw_velocity_group;
ActionManager::register_radio_action (velocity_actions, draw_velocity_group, X_("draw-velocity-auto"), _("Auto"), (sigc::bind (sigc::mem_fun(*this, &Editor::draw_velocity_chosen), DRAW_VEL_AUTO)));
for (int i = 1; i <= 127; i++) {
@ -905,7 +905,7 @@ Editor::register_midi_actions ()
ActionManager::register_radio_action (velocity_actions, draw_velocity_group, buf, vel, (sigc::bind (sigc::mem_fun(*this, &Editor::draw_velocity_chosen), i)));
}
Glib::RefPtr<ActionGroup> channel_actions = ActionManager::create_action_group (midi_bindings, _("Draw Channel"));
Glib::RefPtr<ActionGroup> channel_actions = ActionManager::create_action_group (midi_bindings, X_("DrawChannel"));
RadioAction::Group draw_channel_group;
ActionManager::register_radio_action (channel_actions, draw_channel_group, X_("draw-channel-auto"), _("Auto"), (sigc::bind (sigc::mem_fun(*this, &Editor::draw_channel_chosen), DRAW_CHAN_AUTO)));
for (int i = 0; i <= 15; i++) {
@ -1190,7 +1190,7 @@ Editor::draw_velocity_action (int v)
action = buf;
}
act = ActionManager::get_action (_("Draw Velocity"), action);
act = ActionManager::get_action (X_("DrawVelocity"), action);
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
return ract;
@ -1214,7 +1214,7 @@ Editor::draw_channel_action (int c)
action = buf;
}
act = ActionManager::get_action (_("Draw Channel"), action);
act = ActionManager::get_action (X_("DrawChannel"), action);
if (act) {
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
return ract;

View File

@ -124,7 +124,9 @@ TransportMastersWidget::~TransportMastersWidget ()
void
TransportMastersWidget::set_transport_master (std::shared_ptr<TransportMaster> tm)
{
_session->request_sync_source (tm);
if (_session) {
_session->request_sync_source (tm);
}
}
void