Merged develop into feature

--HG--
branch : feature
This commit is contained in:
Bojan Kverh 2016-09-09 21:55:18 +02:00
commit 853c6852a8
2 changed files with 17 additions and 8 deletions

View File

@ -106,16 +106,14 @@ VSplinePath VSplinePath::Rotate(const QPointF &originPoint, qreal degrees, const
QVector<VSplinePoint> newPoints(CountPoints()); QVector<VSplinePoint> newPoints(CountPoints());
for (qint32 i = 1; i <= CountSubSpl(); ++i) for (qint32 i = 1; i <= CountSubSpl(); ++i)
{ {
const VSplinePoint &p1 = d->path.at(i-1); const VSpline spl = GetSpline(i).Rotate(originPoint, degrees);
const VSplinePoint &p2 = d->path.at(i);
VSpline spl = GetSpline(i).Rotate(originPoint, degrees);
newPoints[i-1].SetP(p1.P()); newPoints[i-1].SetP(spl.GetP1());
newPoints[i-1].SetAngle2(p1.Angle2(), spl.GetStartAngleFormula()); newPoints[i-1].SetAngle2(spl.GetStartAngle(), spl.GetStartAngleFormula());
newPoints[i-1].SetLength2(spl.GetC1Length(), spl.GetC1LengthFormula()); newPoints[i-1].SetLength2(spl.GetC1Length(), spl.GetC1LengthFormula());
newPoints[i].SetP(p2.P()); newPoints[i].SetP(spl.GetP4());
newPoints[i].SetAngle1(p2.Angle1(), spl.GetEndAngleFormula()); newPoints[i].SetAngle1(spl.GetEndAngle(), spl.GetEndAngleFormula());
newPoints[i].SetLength1(spl.GetC2Length(), spl.GetC2LengthFormula()); newPoints[i].SetLength1(spl.GetC2Length(), spl.GetC2LengthFormula());
} }

View File

@ -368,7 +368,18 @@ void VCommonSettings::SetUndoCount(const int &value)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QStringList VCommonSettings::GetRecentFileList() const QStringList VCommonSettings::GetRecentFileList() const
{ {
return value(SettingGeneralRecentFileList).toStringList(); const QStringList files = value(SettingGeneralRecentFileList).toStringList();
QStringList cleared;
for (int i = 0; i < files.size(); ++i)
{
if (QFileInfo(files.at(i)).exists())
{
cleared.append(files.at(i));
}
}
return cleared;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------