Skip to content

Commit

Permalink
Merge pull request #1253 from wawuwo/thicker-ephemeral-wire
Browse files Browse the repository at this point in the history
Make future wire more thicker when laying a new wire
  • Loading branch information
ra3xdh authored Feb 23, 2025
2 parents 69bb9c3 + 20caefa commit 9c59da8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion qucs/schematic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,15 @@ void Schematic::drawPostPaintEvents(QPainter* painter) {
painter->fillRect(p.x1, p.y1, p.x2, p.y2, QColor(200, 220, 240, 100));
painter->drawRect(p.x1, p.y1, p.x2, p.y2);
break;
case _Line:
case _Line: {
painter->save();
QPen lp{painter->pen()};
lp.setWidth(p.a == 0 ? 1 : p.a);
painter->setPen(lp);
painter->drawLine(p.x1, p.y1, p.x2, p.y2);
painter->restore();
break;
}
case _Ellipse:
painter->drawEllipse(p.x1, p.y1, p.x2, p.y2);
break;
Expand Down
2 changes: 1 addition & 1 deletion qucs/schematic_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3213,7 +3213,7 @@ void Schematic::showEphemeralWire(const QPoint& a, const QPoint& b) noexcept {
for (std::size_t i = 1; i < points.size(); i++) {
auto m = points[i-1];
auto n = points[i];
PostPaintEvent(_Line, m.x(), m.y(), n.x(), n.y());
PostPaintEvent(_Line, m.x(), m.y(), n.x(), n.y(), 3);
}

}
Expand Down

0 comments on commit 9c59da8

Please sign in to comment.