mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix crash when setting up toolbar without session (sync button)
This commit is contained in:
parent
8b41d71036
commit
9789efc223
1 changed files with 8 additions and 6 deletions
|
|
@ -927,11 +927,12 @@ void
|
|||
ApplicationBar::parameter_changed (std::string p)
|
||||
{
|
||||
if (p == "external-sync") {
|
||||
if (!_session->config.get_external_sync()) {
|
||||
if (!session || !_session->config.get_external_sync()) {
|
||||
_sync_button.set_text (S_("SyncSource|Int."));
|
||||
} else {
|
||||
_sync_button.set_text (TransportMasterManager::instance().current()->display_name());
|
||||
}
|
||||
UI::instance()->set_tip (_sync_button, _("Enable/Disable external positional sync"));
|
||||
} else if (p == "sync-source") {
|
||||
if (_session) {
|
||||
if (!_session->config.get_external_sync()) {
|
||||
|
|
@ -939,14 +940,15 @@ ApplicationBar::parameter_changed (std::string p)
|
|||
} else {
|
||||
_sync_button.set_text (TransportMasterManager::instance().current()->display_name());
|
||||
}
|
||||
if (_session->config.get_video_pullup() == 0.0f || TransportMasterManager::instance().current()->type() != Engine) {
|
||||
UI::instance()->set_tip (_sync_button, _("Enable/Disable external positional sync"));
|
||||
} else {
|
||||
UI::instance()->set_tip (_sync_button, _("External sync is not possible: video pull up/down is set"));
|
||||
}
|
||||
} else {
|
||||
/* changing sync source without a session is unlikely/impossible , except during startup */
|
||||
_sync_button.set_text (TransportMasterManager::instance().current()->display_name());
|
||||
}
|
||||
if (_session->config.get_video_pullup() == 0.0f || TransportMasterManager::instance().current()->type() != Engine) {
|
||||
UI::instance()->set_tip (_sync_button, _("Enable/Disable external positional sync"));
|
||||
} else {
|
||||
UI::instance()->set_tip (_sync_button, _("External sync is not possible: video pull up/down is set"));
|
||||
UI::instance()->set_tip (_sync_button, X_("Waiting for session to load.."));
|
||||
}
|
||||
} else if (p == "show-mini-timeline") {
|
||||
repack_transport_hbox ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue