Resolved issue #544. Error: Color Lines are black until touched.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2016-08-16 12:30:55 +03:00
parent 45ce971a71
commit 47fb85a2c1
3 changed files with 7 additions and 4 deletions

View File

@ -15,6 +15,7 @@
- [#526] Dialog Detail is not on top after selection second object on Mac. - [#526] Dialog Detail is not on top after selection second object on Mac.
- [#532] Unexpected error occurs when zoom out image. - [#532] Unexpected error occurs when zoom out image.
- [#537] Valentina crashes when use undo command. - [#537] Valentina crashes when use undo command.
- [#544] Error: Color Lines are black until touched.
# Version 0.4.4 April 12, 2016 # Version 0.4.4 April 12, 2016
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements. - Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.

View File

@ -54,7 +54,8 @@ VToolLinePoint::VToolLinePoint(VAbstractPattern *doc, VContainer *data, const qu
QPointF point1 = data->GeometricObject<VPointF>(basePointId)->toQPointF(); QPointF point1 = data->GeometricObject<VPointF>(basePointId)->toQPointF();
QPointF point2 = data->GeometricObject<VPointF>(id)->toQPointF(); QPointF point2 = data->GeometricObject<VPointF>(id)->toQPointF();
mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this); mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this);
mainLine->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, mainLine->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));
mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
} }
@ -71,7 +72,7 @@ VToolLinePoint::~VToolLinePoint()
*/ */
void VToolLinePoint::RefreshGeometry() void VToolLinePoint::RefreshGeometry()
{ {
mainLine->setPen(QPen(CorrectColor(QColor(lineColor)), mainLine->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));
VToolSinglePoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id)); VToolSinglePoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));

View File

@ -62,7 +62,8 @@ VToolLine::VToolLine(VAbstractPattern *doc, VContainer *data, quint32 id, quint3
this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true);
this->setFlag(QGraphicsItem::ItemIsFocusable, true); this->setFlag(QGraphicsItem::ItemIsFocusable, true);
this->setAcceptHoverEvents(true); this->setAcceptHoverEvents(true);
this->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, this->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));
ToolCreation(typeCreation); ToolCreation(typeCreation);
@ -223,7 +224,7 @@ void VToolLine::Disable(bool disable, const QString &namePP)
{ {
enabled = !CorrectDisable(disable, namePP); enabled = !CorrectDisable(disable, namePP);
this->setEnabled(enabled); this->setEnabled(enabled);
this->setPen(QPen(CorrectColor(baseColor), this->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));
} }