]> err.no Git - mapper/commitdiff
Announce distance to destination only if _announce_destination==TRUE
authorKaj-Michael Lang <milang@tal.org>
Fri, 21 Mar 2008 12:45:16 +0000 (14:45 +0200)
committerKaj-Michael Lang <milang@tal.org>
Fri, 21 Mar 2008 12:45:16 +0000 (14:45 +0200)
src/map.c

index a39e8f0d9bebe6f1796af6c6517419c0c72c32d7..a3e279d1426179ab7f948ad8bd1d889988435b52 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -1249,7 +1249,7 @@ if (_dest.valid) {
                        announce_destination_reached();
                dest_reached=TRUE;
        } else if (dt<prev_dt-KM10KNOTS) {
-               if (_center_mode>0)
+               if (_center_mode>0 && _announce_destination==TRUE)
                        announce_distance_to_destination(cdist, UNITS_TEXT[_units], KM10KNOTS);
                prev_dt=dt;
        } else if (dt>prev_dt+KM10KNOTS/4) {
@@ -1264,6 +1264,7 @@ if (_dest.valid) {
        prev_dt=99999.0;
        gtk_label_set_label(GTK_LABEL(info_banner.distance), "");
 }
+
 gtk_compass_set_dest_heading(_gps_compass, _dest.valid, (gfloat)dh);
 gtk_compass_set_dest_heading(_tab_compass, _dest.valid, (gfloat)dh);