VToolLine did not have a keyboard input focus.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-05-25 11:51:26 +03:00
parent 35b1a2fb9a
commit e4ee400903

View File

@ -58,6 +58,7 @@ VToolLine::VToolLine(VAbstractPattern *doc, VContainer *data, quint32 id, quint3
const QSharedPointer<VPointF> second = data->GeometricObject<VPointF>(secondPoint); const QSharedPointer<VPointF> second = data->GeometricObject<VPointF>(secondPoint);
this->setLine(QLineF(*first, *second)); this->setLine(QLineF(*first, *second));
this->setFlag(QGraphicsItem::ItemStacksBehindParent, true); this->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
this->setFlag(QGraphicsItem::ItemIsFocusable, true);// For keyboard input focus
this->setAcceptHoverEvents(true); this->setAcceptHoverEvents(true);
this->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor, this->setPen(QPen(Qt::black, qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor,
LineStyleToPenStyle(typeLine))); LineStyleToPenStyle(typeLine)));