Commit 61da9616 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

CompassFloatItem: avoid multiple assignment, "" -> QString()

parent c888313d
......@@ -140,11 +140,10 @@ void CompassFloatItem::paintContent( QPainter *painter )
QRectF compassRect( contentRect() );
QString dirstr = tr( "N" );
if ( m_polarity == -1 )
dirstr = tr( "S" );
if ( m_polarity == 0 )
dirstr = "";
const QString dirstr =
(m_polarity == +1) ? tr("N") :
(m_polarity == -1) ? tr("S") :
/*else*/ QString();
int fontheight = QFontMetrics( font() ).ascent();
int fontwidth = QFontMetrics( font() ).boundingRect( dirstr ).width();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment