projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When loading LinkableValueNode from a .sif file, accept any of the various names...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
valuenode_duplicate.cpp
diff --git
a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp
b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp
index
2af20e7
..
56f7425
100644
(file)
--- a/
synfig-core/trunk/src/synfig/valuenode_duplicate.cpp
+++ b/
synfig-core/trunk/src/synfig/valuenode_duplicate.cpp
@@
-158,6
+158,7
@@
ValueNode_Duplicate::step(Time t)const
Real from = (*from_)(t).get(Real());
Real to = (*to_ )(t).get(Real());
Real step = (*step_)(t).get(Real());
Real from = (*from_)(t).get(Real());
Real to = (*to_ )(t).get(Real());
Real step = (*step_)(t).get(Real());
+ Real prev = index;
if (step == 0) return false;
if (step == 0) return false;
@@
-165,14
+166,14
@@
ValueNode_Duplicate::step(Time t)const
if (from < to)
{
if (from < to)
{
- index += step;
- return index <= to;
+ if ((index += step) <= to) return true;
}
else
}
else
- {
- index -= step;
- return index >= to;
- }
+ if ((index -= step) >= to) return true;
+
+ // at the end of the loop, leave the index at the last value that was used
+ index = prev;
+ return false;
}
int
}
int