Skip to content

Commit 0a32775

Browse files
committed
Add special treatment for EffectManifestParameter::VALUE_ENUMERATION (wrap around the values)
1 parent baf81bb commit 0a32775

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/effects/effectparameter.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ bool EffectParameter::clampValue(EffectManifestParameter::ValueHint valueHint, Q
133133
return true;
134134
}
135135
break;
136+
case EffectManifestParameter::VALUE_ENUMERATION:
137+
if (value.toDouble() < minimum.toDouble()) {
138+
value = maximum;
139+
return true;
140+
} else if (value.toDouble() > maximum.toDouble()) {
141+
value = minimum;
142+
return true;
143+
}
144+
break;
145+
136146
default:
137147
qWarning() << "ERROR: Unhandled valueHint";
138148
break;

0 commit comments

Comments
 (0)