move clamping code from clip to track

Fixes severe regression related to audio transitions
This commit is contained in:
itsmattkc
2022-11-18 10:20:03 -08:00
parent 7e604e7433
commit 9a0e16f504
3 changed files with 11 additions and 30 deletions
+2 -6
View File
@@ -292,12 +292,8 @@ TimeRange TransitionBlock::InputTimeAdjustment(const QString &input, int element
if (input == kInBlockInput || input == kOutBlockInput) {
Block* block = dynamic_cast<Block*>(GetConnectedOutput(input));
if (block) {
TimeRange range = input_time;
if (clamp) {
range.set_range(std::max(rational(0), range.in()), std::min(this->length(), range.out()));
}
range = range + in() - block->in();
return range;
// Retransform time as if it came from the track
return input_time + in() - block->in();
}
}