From Michael Platings, Fix animation duration when adding channel to animation

This commit is contained in:
Cedric Pinson
2011-01-24 11:45:45 +00:00
parent 71f97cb3bc
commit a503b143cc

View File

@@ -34,7 +34,7 @@ Animation::Animation(const osgAnimation::Animation& anim, const osg::CopyOp& cop
void Animation::addChannel(Channel* pChannel)
{
_channels.push_back(pChannel);
if (!_duration)
if (_duration == _originalDuration)
computeDuration();
else
_originalDuration = computeDurationFromChannels();