X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmap%2Fgpslocationitem.cpp;h=25855139a35d9031abccac1cb73aecf9182c7630;hb=bc4bf2aeb597f39955ed8cbe3a3fdcd5914d7ec8;hp=e164366924a9e3a78a0c369215b5ef405d10e686;hpb=ddd23763a1ccf804fd6c498e6ace286db5e1426a;p=situare diff --git a/src/map/gpslocationitem.cpp b/src/map/gpslocationitem.cpp index e164366..2585513 100644 --- a/src/map/gpslocationitem.cpp +++ b/src/map/gpslocationitem.cpp @@ -19,8 +19,6 @@ USA. */ -const int ACCURATE_LIMIT = 50; // this and lower values (in meters) are considered as accurate - #include #include @@ -63,14 +61,16 @@ void GPSLocationItem::updatePosition(QPoint scenePosition, qreal accuracy) setPos(scenePosition); - if (accuracy != GPS_ACCURACY_UNDEFINED // accuracy must be defined - && accuracy <= ACCURATE_LIMIT // and smaller than limit - && m_currentAccuracy != ACCURATE) { // and accurate pixmap not yet set + if (accuracy == GPS_ACCURACY_UNDEFINED) { // fix is NOT accurate + if (m_currentAccuracy != COARSE) { // coarse pixmap not yet set + setPixmap(m_coarsePixmap); + m_currentAccuracy = COARSE; + } + } + else { // fix is accurate + if (m_currentAccuracy != ACCURATE) { // accurate pixmap not yet set setPixmap(m_accuratePixmap); m_currentAccuracy = ACCURATE; - } - else if (m_currentAccuracy != COARSE) { // coarse pixmap not yet set - setPixmap(m_coarsePixmap); - m_currentAccuracy = COARSE; + } } }