mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-03 02:30:52 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user