From f3060e72e4d54f4db226b884f573deddac0f5a15 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Wed, 22 Jan 2014 16:50:39 +0100 Subject: [PATCH] Issue #552 Companion part done --- companion/src/helpers.cpp | 8 ++++++++ companion/src/modeledit/customfunctions.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index dc1046582..b150b0821 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -420,6 +420,14 @@ void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, u qs.append( QObject::tr("Timer2")); qs.append( QObject::tr("All")); qs.append( QObject::tr("Telemetry")); + int reCount = GetEepromInterface()->getCapability(RotaryEncoders); + if (reCount == 1) { + qs.append( QObject::tr("Rotary Encoder")); + } + else if (reCount == 2) { + qs.append( QObject::tr("REa")); + qs.append( QObject::tr("REb")); + } b->addItems(qs); b->setCurrentIndex(value); } diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index 0f2466b4b..70ea33e0e 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -336,7 +336,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) else if (index==FuncReset) { if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM | CUSTOM_FUNCTION_ENABLE; } else if (index==FuncVolume) { if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt();