diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-23 23:18:47 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-23 23:18:47 +0100 |
commit | a122542597299dc1aedd67e346e3fb7fdfaf033d (patch) | |
tree | c05e6144e6c76cb7fe40b13bc5184ca8c60ef945 /gtk2_ardour | |
parent | 7519e4571955c673c5eb1681681fa442e8bb3768 (diff) |
fix empty/unset sync source preference.
(non JACK backends w/JACK-transport)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index b2cf7f0ae4..4198324b61 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1503,7 +1503,6 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_source) ); - populate_sync_options (); add_option (_("Transport"), _sync_source); _sync_framerate = new BoolOption ( @@ -1575,6 +1574,8 @@ RCOptionEditor::RCOptionEditor () AudioEngine::instance()->get_physical_inputs (DataType::AUDIO, physical_inputs); _ltc_port->set_popdown_strings (physical_inputs); + populate_sync_options (); + add_option (_("Transport"), _ltc_port); // TODO; rather disable this button than not compile it.. @@ -2508,4 +2509,12 @@ RCOptionEditor::populate_sync_options () for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) { _sync_source->add (*i, sync_source_to_string (*i)); } + + if (sync_opts.empty()) { + _sync_source->set_sensitive(false); + } else { + if (std::find(sync_opts.begin(), sync_opts.end(), _rc_config->get_sync_source()) == sync_opts.end()) { + _rc_config->set_sync_source(sync_opts.front()); + } + } } |