Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no redraw of map when stopping drag over osd_speed_warner, osd_stopwatch and osd_odometer #814

Merged
merged 3 commits into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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