logic: Show inheritance edges between parents of active symbol and other visible symbols (issue #167)
* add inheritance edges between parents of active symbol and other visible symbols * add dashed inheritance edges when symbols are no direct decendants * inheritance edges are also respected in layouting, putting base/derived classes in the correct top/bottom spot now bug id = 167
This commit is contained in:
@@ -32,7 +32,8 @@ QPainterPath QtLineItemAngled::shape() const
|
||||
|
||||
void QtLineItemAngled::paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget* widget)
|
||||
{
|
||||
painter->setPen(pen());
|
||||
QPen p = pen();
|
||||
painter->setPen(p);
|
||||
|
||||
QPainterPath path;
|
||||
|
||||
@@ -169,7 +170,17 @@ void QtLineItemAngled::paint(QPainter* painter, const QStyleOptionGraphicsItem*
|
||||
partRect = getArrowBoundingRect(poly);
|
||||
if (drawRect.intersects(partRect) && m_showArrow)
|
||||
{
|
||||
drawArrow(poly, &path);
|
||||
if (m_style.dashed)
|
||||
{
|
||||
QPainterPath arrowPath;
|
||||
drawArrow(poly, &path, &arrowPath);
|
||||
|
||||
painter->drawPath(arrowPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawArrow(poly, &path);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -177,5 +188,11 @@ void QtLineItemAngled::paint(QPainter* painter, const QStyleOptionGraphicsItem*
|
||||
}
|
||||
}
|
||||
|
||||
if (m_style.dashed)
|
||||
{
|
||||
p.setStyle(Qt::DashLine);
|
||||
painter->setPen(p);
|
||||
}
|
||||
|
||||
painter->drawPath(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user