mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-20 01:34:04 +01:00
Fix missing relativePosition when we reset
This commit is contained in:
parent
0ad84736c0
commit
2f481e0846
@ -24,7 +24,7 @@ public:
|
||||
void startup();
|
||||
bool addTimelineFromSettings(const QJsonObject& timelineObj);
|
||||
bool deactivateCurrentTimeline();
|
||||
bool moveTimelineAt(const int index, const QString identifier, const float relativePosition, QString positionTimeString);
|
||||
bool moveTimelineAt(const int index, const QString identifier, const float relativeLinePosition, QString positionTimeString);
|
||||
bool startTimeline();
|
||||
bool addTimelineAt(const int index, const float reltiaveLinePosition, QString identifier);
|
||||
bool removeTimelineAt(const int index);
|
||||
|
@ -296,10 +296,10 @@ void ScreenPlayTimelineManager::updateIndices()
|
||||
timeline section.
|
||||
|
||||
*/
|
||||
bool ScreenPlayTimelineManager::addTimelineAt(const int index, const float reltiaveLinePosition, QString identifier)
|
||||
bool ScreenPlayTimelineManager::addTimelineAt(const int index, const float relativeLinePosition, QString identifier)
|
||||
{
|
||||
// We always get the new endTime
|
||||
const QString newStopPosition = Util().getTimeString(reltiaveLinePosition);
|
||||
const QString newStopPosition = Util().getTimeString(relativeLinePosition);
|
||||
QTime newStopPositionTime = QTime::fromString(newStopPosition, m_timelineTimeFormat);
|
||||
if (!newStopPositionTime.isValid()) {
|
||||
return false;
|
||||
@ -326,6 +326,7 @@ bool ScreenPlayTimelineManager::addTimelineAt(const int index, const float relti
|
||||
newTimelineSection->settings = m_settings;
|
||||
newTimelineSection->globalVariables = m_globalVariables;
|
||||
newTimelineSection->index = index;
|
||||
newTimelineSection->relativePosition = relativeLinePosition;
|
||||
newTimelineSection->identifier = identifier;
|
||||
newTimelineSection->endTime = newStopPositionTime;
|
||||
// In case we do a full reset, we must set the start time manually
|
||||
|
Loading…
Reference in New Issue
Block a user