Skip to content

Commit

Permalink
Fixes mavlink#682
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Jun 3, 2014
1 parent 2f5c158 commit ae7cb28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/map/Waypoint2DIcon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ void Waypoint2DIcon::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
QPen penDash(color);
penDash.setWidth(1);
//penDash.setStyle(Qt::DotLine);
const int loiter = map->metersToPixels(waypoint->getLoiterOrbit(), Coord());
// A negative radius indicates counter-clockwise rotation, but we still want to draw it positive
const int loiter = map->metersToPixels(fabsf(waypoint->getLoiterOrbit()), Coord());
if (loiter > picture.width()/2)
{
painter->setPen(penBlack);
Expand Down

0 comments on commit ae7cb28

Please sign in to comment.