13
0

Fix latency-measurement port-name display

In case there are no pretty-names, a blank text was displayed
This commit is contained in:
Robin Gareus 2019-09-20 23:30:05 +02:00
parent e8822e76d6
commit 799e535b2a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -754,7 +754,11 @@ EngineControl::enable_latency_tab ()
Gtk::TreeModel::iterator iter = lm_output_channel_list->append ();
Gtk::TreeModel::Row row = *iter;
row[lm_output_channel_cols.port_name] = *i;
row[lm_output_channel_cols.pretty_name] = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*i);
std::string pn = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*i);
if (pn.empty()) {
pn = (*i).substr ((*i).find (':') + 1);
}
row[lm_output_channel_cols.pretty_name] = pn;
}
lm_output_channel_combo.set_active (0);
lm_output_channel_combo.set_sensitive (true);
@ -764,7 +768,11 @@ EngineControl::enable_latency_tab ()
Gtk::TreeModel::iterator iter = lm_input_channel_list->append ();
Gtk::TreeModel::Row row = *iter;
row[lm_input_channel_cols.port_name] = *i;
row[lm_input_channel_cols.pretty_name] = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*i);
std::string pn = ARDOUR::AudioEngine::instance()->get_pretty_name_by_name (*i);
if (pn.empty()) {
pn = (*i).substr ((*i).find (':') + 1);
}
row[lm_input_channel_cols.pretty_name] = pn;
}
lm_input_channel_combo.set_active (0);
lm_input_channel_combo.set_sensitive (true);