Fixed steps and keyframes not saving correctly.

This commit is contained in:
leo
2015-03-24 15:12:39 +00:00
parent 01e67cbd88
commit 5dc511d56a
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -299,7 +299,7 @@ void lcModel::SaveLDraw(QTextStream& Stream, bool MPD, bool SelectedOnly) const
CurrentLine++;
}
while (Piece->GetStepShow() < Step)
while (Piece->GetStepShow() > Step)
{
Stream << QLatin1String("0 STEP\r\n");
Step++;
+2 -4
View File
@@ -115,7 +115,7 @@ protected:
lcObjectKey<T>& Key = Keys[KeyIdx];
Stream << QLatin1String("0 !LEOCAD ") << KeyName << Key.Step << ' ';
for (int ValueIdx = 0; ValueIdx < Count; ValueIdx++)
Stream << Key.Value[ValueIdx] << ' ';
Stream << ((float*)&Key.Value)[ValueIdx] << ' ';
Stream << QLatin1String("\r\n");
}
}
@@ -133,9 +133,7 @@ protected:
for (int ValueIdx = 0; ValueIdx < Count; ValueIdx++)
Stream >> ((float*)&Value)[ValueIdx];
lcObjectKey<T>& Key = Keys.Add();
Key.Step = Step;
Key.Value = Value;
ChangeKey(Keys, Value, Step, true);
}
template<typename T>