Remove the second color of conductor.

Add double click on the handler, open the conducteur properties dialog 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60@5034 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-08-27 19:08:02 +00:00
parent 9b4b317d7f
commit 517c7db05e
6 changed files with 9 additions and 160 deletions

View File

@@ -513,19 +513,6 @@ void Conductor::paint(QPainter *qp, const QStyleOptionGraphicsItem *options, QWi
//Draw the conductor
qp -> drawPath(path());
//Draw the second color
if(m_properties.m_bicolor)
{
final_conductor_pen.setColor(m_properties.m_color_2);
final_conductor_pen.setStyle(Qt::CustomDashLine);
QVector<qreal> dash_pattern;
dash_pattern << m_properties.m_dash_size-2 << m_properties.m_dash_size;
final_conductor_pen.setDashPattern(dash_pattern);
qp->save();
qp->setPen(final_conductor_pen);
qp->drawPath(path());
qp->restore();
}
if (m_properties.type == ConductorProperties::Single) {
qp -> setBrush(final_conductor_color);
@@ -718,6 +705,11 @@ bool Conductor::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
handlerMouseReleaseEvent(qghi, static_cast<QGraphicsSceneMouseEvent *>(event));
return true;
}
else if (event->type() == QEvent::GraphicsSceneMouseDoubleClick) //Double click
{
editProperty();
return true;
}
}
}
}