1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

OP-1071 uncrustified

This commit is contained in:
Philippe Renon 2015-01-31 15:36:59 +01:00
parent 5bc17d7b87
commit 44f3821dc6
2 changed files with 6 additions and 8 deletions

View File

@ -67,10 +67,10 @@ void WayPointCircle::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
p2 = QPointF(line.p1().x(), line.p1().y() - line.length());
QPen myPen = pen();
myPen.setColor(myColor);
if(width > 0) {
if (width > 0) {
myPen.setWidth(width);
}
if(dashed){
if (dashed) {
QVector<qreal> dashes;
dashes << 4 << 8;
myPen.setDashPattern(dashes);

View File

@ -99,14 +99,13 @@ void WayPointLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
arrowHead << line().pointAt(0.5) << arrowP1 << arrowP2;
painter->drawPolygon(arrowHead);
if(dashed)
{
if (dashed) {
QVector<qreal> dashes;
dashes << 4 << 8;
myPen.setDashPattern(dashes);
}
if(lineWidth == -1) {
if (lineWidth == -1) {
if (myColor == Qt::red) {
myPen.setWidth(3);
} else if (myColor == Qt::yellow) {
@ -114,9 +113,8 @@ void WayPointLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
} else if (myColor == Qt::green) {
myPen.setWidth(1);
}
}
else {
myPen.setWidth(lineWidth);
} else {
myPen.setWidth(lineWidth);
}
painter->setPen(myPen);
painter->drawLine(line());