ensure blocks are transformed when hashing

Fixes cache glitch
This commit is contained in:
itsmattkc
2021-01-18 10:45:07 +11:00
parent 104cbbe44b
commit 57aa53cc79
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -119,6 +119,11 @@ TimeRange Track::OutputTimeAdjustment(NodeInput *input, int element, const TimeR
return Node::OutputTimeAdjustment(input, element, input_time);
}
rational Track::TransformTimeForBlock(Block *block, const rational &time)
{
return time - block->in();
}
TimeRange Track::TransformRangeForBlock(Block *block, const TimeRange &range)
{
return range - block->in();
@@ -434,7 +439,7 @@ void Track::Hash(QCryptographicHash &hash, const rational &time) const
// Defer to block at this time, don't add any of our own information to the hash
if (b) {
b->Hash(hash, time);
b->Hash(hash, TransformTimeForBlock(b, time));
}
}
+2
View File
@@ -60,6 +60,8 @@ public:
virtual TimeRange OutputTimeAdjustment(NodeInput* input, int element, const TimeRange& input_time) const override;
static rational TransformTimeForBlock(Block* block, const rational& time);
static TimeRange TransformRangeForBlock(Block* block, const TimeRange& range);
const double& GetTrackHeight() const;