industrial-strength-ifying of io connection name cleanup
git-svn-id: svn://localhost/ardour2/branches/3.0@5743 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
658cb435df
commit
db6be4829e
|
@ -926,7 +926,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
|
||||||
Port *port;
|
Port *port;
|
||||||
vector<string> connections;
|
vector<string> connections;
|
||||||
|
|
||||||
uint32_t connection_index;
|
uint32_t connection_index = 0;
|
||||||
uint32_t total_connection_count = 0;
|
uint32_t total_connection_count = 0;
|
||||||
uint32_t io_connection_count = 0;
|
uint32_t io_connection_count = 0;
|
||||||
uint32_t ardour_connection_count = 0;
|
uint32_t ardour_connection_count = 0;
|
||||||
|
@ -980,7 +980,10 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
|
||||||
if (connection_name.find("ardour:") == 0) {
|
if (connection_name.find("ardour:") == 0) {
|
||||||
if (ardour_track_name.empty()) {
|
if (ardour_track_name.empty()) {
|
||||||
// "ardour:Master/in 1" -> "ardour:Master/"
|
// "ardour:Master/in 1" -> "ardour:Master/"
|
||||||
ardour_track_name = connection_name.substr(0, connection_name.find("/") + 1);
|
string::size_type slash = connection_name.find("/");
|
||||||
|
if (slash != string::npos) {
|
||||||
|
ardour_track_name = connection_name.substr(0, slash + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection_name.find(ardour_track_name) == 0) {
|
if (connection_name.find(ardour_track_name) == 0) {
|
||||||
|
@ -1040,8 +1043,11 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
|
||||||
if ((total_connection_count == ardour_connection_count)) {
|
if ((total_connection_count == ardour_connection_count)) {
|
||||||
// all connections are to the same track in ardour
|
// all connections are to the same track in ardour
|
||||||
// "ardour:Master/" -> "Master"
|
// "ardour:Master/" -> "Master"
|
||||||
label << ardour_track_name.substr(7, ardour_track_name.find("/") - 7);
|
string::size_type slash = ardour_track_name.find("/");
|
||||||
have_label = true;
|
if (slash != string::npos) {
|
||||||
|
label << ardour_track_name.substr(7, slash - 7);
|
||||||
|
have_label = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (total_connection_count == system_connection_count) {
|
else if (total_connection_count == system_connection_count) {
|
||||||
// all connections are to system ports
|
// all connections are to system ports
|
||||||
|
|
Loading…
Reference in New Issue
Block a user