From 9059922e1b75c32ac78cc66e10387063790bfa91 Mon Sep 17 00:00:00 2001 From: "Chris \"Koying\" Browet" Date: Fri, 15 Jun 2012 11:11:17 +0200 Subject: [PATCH 2/8] FIX : Assert "width > 0" with wireframe with style --- src/Features/Way.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Features/Way.cpp b/src/Features/Way.cpp index fdbf722..7eea383 100644 --- a/src/Features/Way.cpp +++ b/src/Features/Way.cpp @@ -382,9 +382,8 @@ void Way::drawSimple(QPainter &P, MapView *theView) thePen = QPen(thePainter->BackgroundColor,thePainter->BackgroundOffset); else thePen = QPen(p->SimpleColor,(qreal)p->SimpleWidth/LANEWIDTH); - } else - if (thePainter->DrawForeground) - thePen = QPen(thePainter->ForegroundColor,thePainter->ForegroundOffset); + } else if (thePainter->DrawForeground) + thePen = QPen(thePainter->ForegroundColor,thePainter->ForegroundOffset >= 1 ? thePainter->ForegroundOffset : (qreal)p->SimpleWidth/LANEWIDTH); else thePen = QPen(p->SimpleColor,(qreal)p->SimpleWidth/LANEWIDTH); } -- 1.8.4.2 .