Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Border around component when copy and paste.

2 posters

Go down  Message [Page 1 of 1]

n3645



When copy components, they usually change colors. However these have an image do not change to indicate copy, for instance DS18B20.

If it is not easy change color, a border / rectangle may be drawn as an indicator..



Last edited by arcachofo on Tue May 17, 2022 4:29 pm; edited 1 time in total (Reason for editing : Mark as solved (green color))

arcachofo

arcachofo

This is something pending for long time, and now I see there is a very simple solution.
I can't commit right now, but the solution is like this:

src/gui/circuitwidget/component.cpp (line 561):
Code:
void Component::paint( QPainter* p, const QStyleOptionGraphicsItem*, QWidget* )
{
    QPen pen( Qt::black, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin );
    QColor color;

    if( isSelected() )
    {
        //pen.setColor( Qt::darkGray);           // REMOVE THESE 2 LINES
        //color = Qt::darkGray;
        p->fillRect( boundingRect(), Qt::gray  );   // ADD THESE 2 LINES
        p->setOpacity( 0.5 );
    }

n3645



arcachofo wrote:This is something pending for long time, and now I see there is a very simple solution.

Perfect. Thank you.

arcachofo

arcachofo

Solved at Rev 1186.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum