diff options
author | Robin Gareus <robin@gareus.org> | 2015-07-02 10:02:28 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-07-02 10:03:21 +0200 |
commit | 71595234bcac7927c5bf3e5006a60627d19c60f8 (patch) | |
tree | e0021d7aca939cd660c898b3132979b72179017f /gtk2_ardour | |
parent | fe5852fc1d90097cf16d5715ce4276dcca742dfa (diff) |
indicate port-connections of non-track type
Previously a Midi-track with synth showed “-“ for the output
even if the audio output ports were connected. (only MIDI
connections are displayed on the button).
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index a011d2e9b3..661d1f6db9 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1179,6 +1179,7 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt uint32_t ardour_connection_count = 0; uint32_t system_connection_count = 0; uint32_t other_connection_count = 0; + uint32_t typed_connection_count = 0; ostringstream label; @@ -1196,8 +1197,12 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt //to avoid confusion, the button caption should only show connections that match the datatype of the track DataType dt = DataType::AUDIO; - if ( boost::dynamic_pointer_cast<MidiTrack>(route) != 0 ) + if ( boost::dynamic_pointer_cast<MidiTrack>(route) != 0 ) { dt = DataType::MIDI; + // avoid further confusion with Midi-tracks that have a synth. + // Audio-ports may be connected, but button says "Disconnected" + tooltip << _("MIDI "); + } if (for_input) { io_count = route->n_inputs().n_total(); @@ -1215,12 +1220,17 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt port = route->output()->nth (io_index); } - //ignore any port connections that don't match our DataType - if (port->type() != dt) - continue; - port_connections.clear (); port->get_connections(port_connections); + + //ignore any port connections that don't match our DataType + if (port->type() != dt) { + if (!port_connections.empty()) { + ++typed_connection_count; + } + continue; + } + io_connection_count = 0; if (!port_connections.empty()) { @@ -1360,6 +1370,9 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt // Odd configuration label << "*" << total_connection_count << "*"; } + if (typed_connection_count > 0) { + label << "\u2295"; // circled plus + } } if (for_input) { |