From 2e56525f6298e99aa354d8e0ecbced032e1d0b66 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 17 May 2015 18:35:29 +0300 Subject: [PATCH 1/4] Preparation to new release. --HG-- branch : release --- dist/debian/changelog | 2 +- dist/rpm/_service | 2 +- dist/rpm/valentina.spec | 2 +- src/app/version.cpp | 2 +- src/app/version.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) 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/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 From 796cd7079ed1788cd436a1c2079f52ba4cb87710 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 17 May 2015 18:43:57 +0300 Subject: [PATCH 2/4] Fixed issue #304. Layout appears different than my pattern. --HG-- branch : release --- src/libs/vlayout/vabstractdetail.cpp | 37 ++++++++++++++-------------- src/libs/vlayout/vlayoutdetail.cpp | 15 +---------- 2 files changed, 20 insertions(+), 32 deletions(-) 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 From 1e1488e290ef41c5013de94e9fe917126ed68280 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 20 May 2015 20:37:16 +0300 Subject: [PATCH 3/4] Fixed issue #297. Scaling Error - Print. --HG-- branch : release --- src/app/tablewindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); } } From ed85e037ef0277c0f716e6dc1e961ac853f8d62d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 20 May 2015 20:40:13 +0300 Subject: [PATCH 4/4] Changes in version 0.3.3. --HG-- branch : release --- ChangeLog.txt | 4 ++++ 1 file changed, 4 insertions(+) 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.