Skip to content

Commit

Permalink
Merge pull request #814 from hoehnp/trunk
Browse files Browse the repository at this point in the history
fix:osd: no redraw of map when stopping drag over osd_speed_warner, osd_stopwatch and osd_odometer
  • Loading branch information
metalstrolch committed Jul 25, 2019
2 parents 0f08c04 + a0e00e9 commit b6c0c86
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 0 additions & 2 deletions navit/binding/dbus/binding_dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
#include "osd.h"
#include "route.h"
#include "search.h"
#include "callback.h"
#include "gui.h"
#include "layout.h"
#include "roadprofile.h"
#include "util.h"
#include "transform.h"
Expand Down
22 changes: 14 additions & 8 deletions navit/osd/core/osd_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,11 @@ static void osd_odometer_click(struct osd_priv_common *opc, struct navit *nav, i
return;
if (button != 1)
return;
if (navit_ignore_button(nav))
return;
if (!!pressed == !!opc->osd_item.pressed)
return;
if (navit_ignore_button(nav))
return;
opc->osd_item.pressed=pressed;

gettimeofday(&tv,NULL);
curr_time = (double)(tv.tv_usec)/1000000.0+tv.tv_sec;
Expand Down Expand Up @@ -1359,10 +1360,11 @@ static void osd_stopwatch_click(struct osd_priv_common *opc, struct navit *nav,
return;
if (button != 1)
return;
if (navit_ignore_button(nav))
return;
if (!!pressed == !!opc->osd_item.pressed)
return;
if (navit_ignore_button(nav))
return;
opc->osd_item.pressed=pressed;

if (pressed) { //single click handling

Expand Down Expand Up @@ -2725,13 +2727,17 @@ static void osd_speed_warner_click(struct osd_priv_common *opc, struct navit *na
return;
if (button != 1)
return;
if (navit_ignore_button(nav))
return;
if (!!pressed == !!opc->osd_item.pressed)
return;

this->active = !this->active;
osd_speed_warner_draw(opc, nav, NULL);
if (navit_ignore_button(nav))
return;
opc->osd_item.pressed=pressed;
if (pressed)
{
this->active = !this->active;
osd_speed_warner_draw(opc, nav, NULL);
}
}


Expand Down

0 comments on commit b6c0c86

Please sign in to comment.