Browse Source

Fix SvgSwitch value to frame mapping for minValue != 0.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
8bca3dec39
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/app/SvgSwitch.cpp

+ 1
- 1
src/app/SvgSwitch.cpp View File

@@ -32,7 +32,7 @@ void SvgSwitch::addFrame(std::shared_ptr<Svg> svg) {

void SvgSwitch::onChange(const event::Change &e) {
if (!frames.empty() && paramQuantity) {
int index = (int) std::round(paramQuantity->getValue());
int index = (int) std::round(paramQuantity->getValue() - paramQuantity->getMinValue());
index = math::clamp(index, 0, (int) frames.size() - 1);
sw->setSvg(frames[index]);
fb->dirty = true;


Loading…
Cancel
Save