Skip to content

Commit

Permalink
Add special treatment for EffectManifestParameter::VALUE_ENUMERATION …
Browse files Browse the repository at this point in the history
…(wrap around the values)
  • Loading branch information
badescunicu committed Aug 1, 2014
1 parent baf81bb commit 0a32775
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/effects/effectparameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ bool EffectParameter::clampValue(EffectManifestParameter::ValueHint valueHint, Q
return true;
}
break;
case EffectManifestParameter::VALUE_ENUMERATION:
if (value.toDouble() < minimum.toDouble()) {
value = maximum;
return true;
} else if (value.toDouble() > maximum.toDouble()) {
value = minimum;
return true;
}
break;

default:
qWarning() << "ERROR: Unhandled valueHint";
break;
Expand Down

0 comments on commit 0a32775

Please sign in to comment.