mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
Add button to disable/enable auto conductor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3596 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -280,18 +280,21 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
|
||||
{
|
||||
if (!m_help_line)
|
||||
m_help_line = new QGraphicsLineItem(this);
|
||||
m_help_line -> setPen(QPen (Qt::darkBlue));
|
||||
|
||||
QLineF line(HelpLine());
|
||||
|
||||
Terminal *t = alignedWithTerminal();
|
||||
if (t)
|
||||
if (Diagram *dia = diagram())
|
||||
{
|
||||
line.setP2(t -> dockConductor());
|
||||
m_help_line -> setPen(QPen (Qt::darkGreen));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_help_line -> setPen(QPen (Qt::darkBlue));
|
||||
if (dia -> project() -> autoConductor())
|
||||
{
|
||||
Terminal *t = alignedWithTerminal();
|
||||
if (t)
|
||||
{
|
||||
line.setP2(t -> dockConductor());
|
||||
m_help_line -> setPen(QPen (Qt::darkGreen));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Map the line (in scene coordinate) to help_line coordinate
|
||||
|
||||
Reference in New Issue
Block a user