Merge with release

This commit is contained in:
Roman Telezhynskyi 2015-05-20 20:40:46 +03:00
commit b5249e8565
9 changed files with 35 additions and 43 deletions

View File

@ -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 # Version 0.3.2 Released May 15, 2015
- [#298] Segmented Curve isn't selected in Seam Allowance tool. - [#298] Segmented Curve isn't selected in Seam Allowance tool.
- [#299] Error when opening .val file. - [#299] Error when opening .val file.

View File

@ -1,4 +1,4 @@
valentina (0.3.2) trusty; urgency=low valentina (0.3.3) trusty; urgency=low
* Auto build. * Auto build.

2
dist/rpm/_service vendored
View File

@ -1,7 +1,7 @@
<services> <services>
<service name="tar_scm"> <service name="tar_scm">
<param name="url">https://github.com/dismine/Valentina.git</param> <param name="url">https://github.com/dismine/Valentina.git</param>
<param name="versionprefix">0.3.2</param> <param name="versionprefix">0.3.3</param>
<param name="filename">valentina</param> <param name="filename">valentina</param>
<param name="scm">git</param> <param name="scm">git</param>
<param name="versionformat">%at</param> <param name="versionformat">%at</param>

View File

@ -33,7 +33,7 @@ BuildRequires: update-desktop-files
Requires: poppler-utils Requires: poppler-utils
Version: 0.3.2 Version: 0.3.3
Release: 0 Release: 0
URL: https://bitbucket.org/dismine/valentina URL: https://bitbucket.org/dismine/valentina
License: GPL-3.0+ License: GPL-3.0+

View File

@ -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, painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthHairLine()), Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin)); Qt::RoundJoin));
painter.setBrush ( QBrush ( Qt::NoBrush ) ); painter.setBrush ( QBrush ( Qt::NoBrush ) );
scenes.at(i)->render(&painter); scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
painter.end(); painter.end();
} }
} }
@ -345,7 +345,7 @@ void TableWindow::PngFile(const QString &name, int i) const
{ {
const QRectF r = paper->rect(); const QRectF r = paper->rect();
// Create the image with the exact size of the shrunk scene // Create the image with the exact size of the shrunk scene
QImage image(QSize(static_cast<qint32>(r.width()), static_cast<qint32>(r.height())), QImage::Format_ARGB32); QImage image(r.size().toSize(), QImage::Format_ARGB32);
image.fill(Qt::transparent); // Start all pixels transparent image.fill(Qt::transparent); // Start all pixels transparent
QPainter painter(&image); QPainter painter(&image);
painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); 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, painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin)); Qt::RoundJoin));
painter.setBrush ( QBrush ( Qt::NoBrush ) ); painter.setBrush ( QBrush ( Qt::NoBrush ) );
scenes.at(i)->render(&painter, r, r); scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
image.save(name); 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, painter.setPen(QPen(Qt::black, qApp->toPixel(qApp->widthMainLine()), Qt::SolidLine, Qt::RoundCap,
Qt::RoundJoin)); Qt::RoundJoin));
painter.setBrush ( QBrush ( Qt::NoBrush ) ); painter.setBrush ( QBrush ( Qt::NoBrush ) );
scenes.at(i)->render(&painter); scenes.at(i)->render(&painter, r, r, Qt::IgnoreAspectRatio);
painter.end(); painter.end();
} }
} }
@ -462,7 +462,7 @@ void TableWindow::ObjFile(const QString &name, int i) const
generator.setResolution(static_cast<int>(qApp->PrintDPI)); generator.setResolution(static_cast<int>(qApp->PrintDPI));
QPainter painter; QPainter painter;
painter.begin(&generator); painter.begin(&generator);
scenes.at(i)->render(&painter); scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
painter.end(); painter.end();
} }
} }

View File

@ -33,7 +33,7 @@
extern const int MAJOR_VERSION = 0; extern const int MAJOR_VERSION = 0;
extern const int MINOR_VERSION = 3; 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) extern const QString APP_VERSION(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION)
.arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE)); .arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE));

View File

@ -39,8 +39,8 @@ extern const QString APP_VERSION;
// Change version number in version.cpp too. // Change version number in version.cpp too.
#define VER_FILEVERSION 0,3,2,0 #define VER_FILEVERSION 0,3,3,0
#define VER_FILEVERSION_STR "0.3.2.0\0" #define VER_FILEVERSION_STR "0.3.3.0\0"
#define VER_PRODUCTVERSION VER_FILEVERSION #define VER_PRODUCTVERSION VER_FILEVERSION
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR

View File

@ -227,26 +227,27 @@ QVector<QPointF> VAbstractDetail::Equidistant(const QVector<QPointF> &points, co
QVector<QPointF> VAbstractDetail::RemoveDublicates(const QVector<QPointF> &points) QVector<QPointF> VAbstractDetail::RemoveDublicates(const QVector<QPointF> &points)
{ {
QVector<QPointF> p = points; QVector<QPointF> 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) #if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
{ p.remove(p.size() - 1);
continue; #else
} p.removeLast();
else #endif
{ }
QPointF temp = p.at(j); }
if (current == temp)
{ for (int i = 0; i < p.size()-1; ++i)
QVector<QPointF>::iterator iter = p.begin() + j; {
p.erase(iter); if (p.at(i) == p.at(i+1))
j--; {
} p.erase(p.begin() + i + 1);
} --i;
continue;
} }
} }

View File

@ -69,14 +69,7 @@ QVector<QPointF> VLayoutDetail::GetContourPoints() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VLayoutDetail::SetCountourPoints(const QVector<QPointF> &points) void VLayoutDetail::SetCountourPoints(const QVector<QPointF> &points)
{ {
d->contour = points; d->contour = RemoveDublicates(RoundPoints(points));
// Contour can't be closed
if (d->contour.first() == d->contour.last())
{
d->contour.removeLast();
}
d->contour = RemoveDublicates(RoundPoints(d->contour));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -94,12 +87,6 @@ void VLayoutDetail::SetSeamAllowencePoints(const QVector<QPointF> &points, bool
d->seamAllowence = points; d->seamAllowence = points;
if (not d->seamAllowence.isEmpty()) 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)); d->seamAllowence = RemoveDublicates(RoundPoints(d->seamAllowence));
} }
else else