Have editor only request value when CC is used
This commit is contained in:
parent
68ee6775bb
commit
4731bef9e1
1 changed files with 7 additions and 4 deletions
|
|
@ -486,11 +486,14 @@ void Editor::Impl::uiReceiveValue(EditId id, const EditValue& v)
|
||||||
updateCCValue(unsigned(ccForEditId(id)), v.to_float());
|
updateCCValue(unsigned(ccForEditId(id)), v.to_float());
|
||||||
}
|
}
|
||||||
else if (editIdIsCCUsed(id)) {
|
else if (editIdIsCCUsed(id)) {
|
||||||
updateCCUsed(ccUsedForEditId(id), v.to_float() != 0);
|
bool used = v.to_float() != 0;
|
||||||
|
updateCCUsed(ccUsedForEditId(id), used);
|
||||||
// TODO(jpc) remove value requests, when implementing CC automation
|
// TODO(jpc) remove value requests, when implementing CC automation
|
||||||
char pathBuf[256];
|
if (used) {
|
||||||
sprintf(pathBuf, "/cc%u/value", ccUsedForEditId(id));
|
char pathBuf[256];
|
||||||
sendQueuedOSC(pathBuf, "", nullptr);
|
sprintf(pathBuf, "/cc%u/value", ccUsedForEditId(id));
|
||||||
|
sendQueuedOSC(pathBuf, "", nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (editIdIsCCDefault(id)) {
|
else if (editIdIsCCDefault(id)) {
|
||||||
updateCCDefaultValue(ccDefaultForEditId(id), v.to_float());
|
updateCCDefaultValue(ccDefaultForEditId(id), v.to_float());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue