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

(grafted from f62bbdf4122fa02aa12d110d123b900b94c423d1)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-16 18:23:20 +03:00
parent 279e17c5b3
commit 3ef57202d1
3 changed files with 7 additions and 4 deletions

View File

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

View File

@ -76,7 +76,8 @@ VToolLinePoint::VToolLinePoint(VAbstractPattern *doc, VContainer *data, const qu
QPointF point1 = *data->GeometricObject<VPointF>(basePointId);
QPointF point2 = *data->GeometricObject<VPointF>(id);
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)));
mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
}
@ -93,7 +94,7 @@ VToolLinePoint::~VToolLinePoint()
*/
void VToolLinePoint::RefreshGeometry()
{
mainLine->setPen(QPen(CorrectColor(QColor(lineColor)),
mainLine->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine)));
VToolSinglePoint::RefreshPointGeometry(*VDrawTool::data.GeometricObject<VPointF>(id));

View File

@ -85,7 +85,8 @@ VToolLine::VToolLine(VAbstractPattern *doc, VContainer *data, quint32 id, quint3
this->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
this->setFlag(QGraphicsItem::ItemIsFocusable, true);// For keyboard input focus
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)));
ToolCreation(typeCreation);
@ -233,7 +234,7 @@ void VToolLine::Disable(bool disable, const QString &namePP)
{
enabled = !CorrectDisable(disable, namePP);
this->setEnabled(enabled);
this->setPen(QPen(CorrectColor(baseColor),
this->setPen(QPen(CorrectColor(lineColor),
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine)));
}