implemented offsets into sliders

This commit is contained in:
itsmattkc
2021-03-15 18:23:00 +11:00
parent c6a2349ad6
commit acb8c6865a
7 changed files with 83 additions and 37 deletions
+2 -2
View File
@@ -48,14 +48,14 @@ QString TimeSlider::ValueToString(const QVariant &v)
return IntegerSlider::ValueToString(v);
}
return Timecode::timestamp_to_timecode(v.toLongLong(),
return Timecode::timestamp_to_timecode(v.toLongLong() + GetOffset().toLongLong(),
timebase_,
Core::instance()->GetTimecodeDisplay());
}
QVariant TimeSlider::StringToValue(const QString &s, bool *ok)
{
return QVariant::fromValue(Timecode::timecode_to_timestamp(s, timebase_, Core::instance()->GetTimecodeDisplay(), ok));
return QVariant::fromValue(Timecode::timecode_to_timestamp(s, timebase_, Core::instance()->GetTimecodeDisplay(), ok) - GetOffset().toLongLong());
}
void TimeSlider::TimecodeDisplayChanged()