From d834f261bd919de71bba027630257d4d349ebbed Mon Sep 17 00:00:00 2001 From: Mauro Bettella Date: Sun, 11 Aug 2024 00:31:23 +0200 Subject: [PATCH] Update qgsgpsinformationwidget.cpp --- src/app/gps/qgsgpsinformationwidget.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index 17e4e7e4d2a0..610e0be1fd33 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -403,6 +403,7 @@ void QgsGpsInformationWidget::displayGPSInformation( const QgsGpsInformation &in QColor bg( Qt::white ); // moved several items outside of the following if block to minimize loop time bg.setAlpha( 200 ); QColor myColor; + QColor penColor; // Add a marker to the polar plot if ( currentInfo.id > 0 ) // don't show satellite if id=0 (no satellite indication) @@ -446,20 +447,21 @@ void QgsGpsInformationWidget::displayGPSInformation( const QgsGpsInformation &in symbolStyle = QwtSymbol::Ellipse; // N, S; myColor = Qt::gray; } + penColor = myColor; symbolBrush = QBrush( myColor ); if ( currentInfo.signal < 30 ) //weak signal { - myColor = Qt::red; + penColor = Qt::red; // red border } if ( currentInfo.inUse ) { - myColor = Qt::black; + penColor = Qt::black; // black border } #if (QWT_POLAR_VERSION<0x010000) mypMarker->setSymbol( QwtSymbol( symbolStyle, - symbolBrush, QPen( myColor ), markerSize ) ); + symbolBrush, QPen( penColor ), markerSize ) ); #else mypMarker->setSymbol( new QwtSymbol( symbolStyle, symbolBrush, QPen( myColor ), markerSize ) );