Fix dimension highlighting problems

Derived all lines from PrimPath
This commit is contained in:
WandererFan
2016-08-03 13:05:25 -04:00
committed by wmayer
parent a6b9f5286c
commit 498e37b39c
16 changed files with 278 additions and 87 deletions

View File

@@ -51,13 +51,14 @@ QGIPrimPath::QGIPrimPath():
setAcceptHoverEvents(true);
isHighlighted = false;
setPrettyNormal();
m_colCurrent = getNormalColor();
m_styleCurrent = Qt::SolidLine;
m_pen.setStyle(m_styleCurrent);
m_pen.setCapStyle(Qt::RoundCap);
m_pen.setWidthF(m_width);
setPrettyNormal();
}
QVariant QGIPrimPath::itemChange(GraphicsItemChange change, const QVariant &value)
@@ -120,6 +121,7 @@ void QGIPrimPath::paint ( QPainter * painter, const QStyleOptionGraphicsItem * o
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
m_pen.setWidthF(m_width);
m_pen.setColor(m_colCurrent);
m_pen.setStyle(m_styleCurrent);
setPen(m_pen);
@@ -156,6 +158,11 @@ void QGIPrimPath::setWidth(double w)
m_pen.setWidthF(m_width);
}
void QGIPrimPath::setStyle(Qt::PenStyle s)
{
m_styleCurrent = s;
}
Base::Reference<ParameterGrp> QGIPrimPath::getParmGroup()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()