diff --git a/ChangeLog.txt b/ChangeLog.txt index 3a79ed6d4..d0b99aad1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +# Version 0.3.3 Released May 20, 2015 +- [#297] Scaling Error - Print. +- [#304] Layout appears different than my pattern. + # Version 0.3.2 Released May 15, 2015 - [#298] Segmented Curve isn't selected in Seam Allowance tool. - [#299] Error when opening .val file. diff --git a/dist/debian/changelog b/dist/debian/changelog index 56561753a..32149b8c6 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,4 +1,4 @@ -valentina (0.3.2) trusty; urgency=low +valentina (0.3.3) trusty; urgency=low * Auto build. diff --git a/dist/rpm/_service b/dist/rpm/_service index 3bdb8cc88..79b43ac12 100644 --- a/dist/rpm/_service +++ b/dist/rpm/_service @@ -1,7 +1,7 @@ https://github.com/dismine/Valentina.git - 0.3.2 + 0.3.3 valentina git %at diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index f59c242eb..fe7317e19 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -33,7 +33,7 @@ BuildRequires: update-desktop-files Requires: poppler-utils -Version: 0.3.2 +Version: 0.3.3 Release: 0 URL: https://bitbucket.org/dismine/valentina License: GPL-3.0+ diff --git a/src/app/tablewindow.cpp b/src/app/tablewindow.cpp index d74671771..29acee427 100644 --- a/src/app/tablewindow.cpp +++ b/src/app/tablewindow.cpp @@ -328,7 +328,7 @@ void TableWindow::SvgFile(const QString &name, int i) const painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine()), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); - scenes.at(i)->render(&painter); + scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio); painter.end(); } } @@ -345,7 +345,7 @@ void TableWindow::PngFile(const QString &name, int i) const { const QRectF r = paper->rect(); // Create the image with the exact size of the shrunk scene - QImage image(QSize(static_cast(r.width()), static_cast(r.height())), QImage::Format_ARGB32); + QImage image(r.size().toSize(), QImage::Format_ARGB32); image.fill(Qt::transparent); // Start all pixels transparent QPainter painter(&image); painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); @@ -353,7 +353,7 @@ void TableWindow::PngFile(const QString &name, int i) const painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); - scenes.at(i)->render(&painter, r, r); + scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio); image.save(name); } } @@ -386,7 +386,7 @@ void TableWindow::PdfFile(const QString &name, int i) const painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); - scenes.at(i)->render(&painter); + scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio); painter.end(); } } @@ -462,7 +462,7 @@ void TableWindow::ObjFile(const QString &name, int i) const generator.setResolution(static_cast(qApp->PrintDPI)); QPainter painter; painter.begin(&generator); - scenes.at(i)->render(&painter); + scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio); painter.end(); } } diff --git a/src/app/version.cpp b/src/app/version.cpp index b51b7ef5a..1a871e797 100644 --- a/src/app/version.cpp +++ b/src/app/version.cpp @@ -33,7 +33,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 3; -extern const int DEBUG_VERSION = 2; +extern const int DEBUG_VERSION = 3; extern const QString APP_VERSION(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION) .arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE)); diff --git a/src/app/version.h b/src/app/version.h index 3ad509bad..3b9574882 100644 --- a/src/app/version.h +++ b/src/app/version.h @@ -39,8 +39,8 @@ extern const QString APP_VERSION; // Change version number in version.cpp too. -#define VER_FILEVERSION 0,3,2,0 -#define VER_FILEVERSION_STR "0.3.2.0\0" +#define VER_FILEVERSION 0,3,3,0 +#define VER_FILEVERSION_STR "0.3.3.0\0" #define VER_PRODUCTVERSION VER_FILEVERSION #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR diff --git a/src/libs/vlayout/vabstractdetail.cpp b/src/libs/vlayout/vabstractdetail.cpp index 5c8ab52e5..11845cf92 100644 --- a/src/libs/vlayout/vabstractdetail.cpp +++ b/src/libs/vlayout/vabstractdetail.cpp @@ -227,26 +227,27 @@ QVector VAbstractDetail::Equidistant(const QVector &points, co QVector VAbstractDetail::RemoveDublicates(const QVector &points) { QVector p = points; - for (int i = 0; i < p.size(); i++) - { - QPointF current = p.at(i); - for (int j = i; j < p.size(); j++) + if (not p.isEmpty() && p.size() > 1) + { + // Path can't be closed + if (p.first() == p.last()) { - if (j == i) - { - continue; - } - else - { - QPointF temp = p.at(j); - if (current == temp) - { - QVector::iterator iter = p.begin() + j; - p.erase(iter); - j--; - } - } + #if QT_VERSION < QT_VERSION_CHECK(5, 1, 0) + p.remove(p.size() - 1); + #else + p.removeLast(); + #endif + } + } + + for (int i = 0; i < p.size()-1; ++i) + { + if (p.at(i) == p.at(i+1)) + { + p.erase(p.begin() + i + 1); + --i; + continue; } } diff --git a/src/libs/vlayout/vlayoutdetail.cpp b/src/libs/vlayout/vlayoutdetail.cpp index a94d48d5f..840828f22 100644 --- a/src/libs/vlayout/vlayoutdetail.cpp +++ b/src/libs/vlayout/vlayoutdetail.cpp @@ -69,14 +69,7 @@ QVector VLayoutDetail::GetContourPoints() const //--------------------------------------------------------------------------------------------------------------------- void VLayoutDetail::SetCountourPoints(const QVector &points) { - d->contour = points; - // Contour can't be closed - if (d->contour.first() == d->contour.last()) - { - d->contour.removeLast(); - } - - d->contour = RemoveDublicates(RoundPoints(d->contour)); + d->contour = RemoveDublicates(RoundPoints(points)); } //--------------------------------------------------------------------------------------------------------------------- @@ -94,12 +87,6 @@ void VLayoutDetail::SetSeamAllowencePoints(const QVector &points, bool d->seamAllowence = points; if (not d->seamAllowence.isEmpty()) { - // Seam allowence can't be closed - if (d->seamAllowence.first() == d->seamAllowence.last()) - { - d->seamAllowence.removeLast(); - } - d->seamAllowence = RemoveDublicates(RoundPoints(d->seamAllowence)); } else