summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-01-26 01:21:28 +0100
committerRobin Gareus <robin@gareus.org>2014-01-26 01:21:28 +0100
commit249ee47296fdaf000c2820e9922d8b429020759e (patch)
tree7708c24d81f3022183d513e6096358bd7d3b1868
parent9a190b8d2b6e78658ea625322323728ad1c9929b (diff)
fix routing display for mono synths and midi-tracks w/o synth
-rw-r--r--gtk2_ardour/processor_box.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index c2421dcabf..cb72162773 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -844,6 +844,13 @@ ProcessorEntry::RoutingIcon::on_expose_event (GdkEventExpose* ev)
cairo_move_to (cr, si_x, height);
cairo_line_to (cr, si_x, 0);
cairo_stroke (cr);
+ } else if (midi_sources == 1 && midi_sinks == 1) {
+ /* unusual cases -- removed synth, midi-track w/audio plugins */
+ const float si_x = rintf(width * (sinks > 1 ? .2f : .5f)) + .5f;
+ const float si_x0 = rintf(width * (sources > 1 ? .2f : .5f)) + .5f;
+ cairo_move_to (cr, si_x, height);
+ cairo_curve_to (cr, si_x, 0, si_x0, height, si_x0, 0);
+ cairo_stroke (cr);
}
/* AUDIO */
@@ -855,8 +862,10 @@ ProcessorEntry::RoutingIcon::on_expose_event (GdkEventExpose* ev)
UINT_RGBA_B_FLT(audio_port_color));
if (_splitting) {
+ assert(audio_sources < 2);
assert(audio_sinks > 1);
- const float si_x0 = rintf(width * .5f) + .5f;
+ /* assume there is only ever one MIDI port */
+ const float si_x0 = rintf(width * (midi_sources > 0 ? .8f : .5f)) + .5f;
for (uint32_t i = midi_sinks; i < sinks; ++i) {
const float si_x = rintf(width * (.2f + .6f * i / (sinks - 1.f))) + .5f;
cairo_move_to (cr, si_x, height);