From a596001338f9429e70646dadc01ea28dadd70d18 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Thu, 12 Jun 2014 15:16:50 +0200 Subject: [PATCH] Companion mixer tab, if CH1 is empty the Move up button will never bring something there, fixes #1261 --- companion/src/modeledit/mixes.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/companion/src/modeledit/mixes.cpp b/companion/src/modeledit/mixes.cpp index 75c8793f3..f6b4ab97f 100644 --- a/companion/src/modeledit/mixes.cpp +++ b/companion/src/modeledit/mixes.cpp @@ -522,10 +522,17 @@ void MixesPanel::mixerlistWidget_KeyPress(QKeyEvent *event) int MixesPanel::gm_moveMix(int idx, bool dir) //true=inc=down false=dec=up { - if(idx>firmware->getCapability(Mixes) || (idx==0 && !dir) || (idx==firmware->getCapability(Mixes) && dir)) return idx; + if(idx>firmware->getCapability(Mixes) || (idx==firmware->getCapability(Mixes) && dir)) return idx; + + MixData &src=model.mixData[idx]; + + if (idx==0 && !dir) { + //special case: topmost mixer moving up + if (src.destCh > 1) src.destCh--; + return idx; + } int tdx = dir ? idx+1 : idx-1; - MixData &src=model.mixData[idx]; MixData &tgt=model.mixData[tdx]; unsigned int outputs = firmware->getCapability(Outputs);