diff options
author | Lionel AINS <lains@caramail.com> | 2018-11-20 20:59:55 +0100 |
---|---|---|
committer | Lionel AINS <lains@caramail.com> | 2018-11-20 20:59:55 +0100 |
commit | 93d74f9b922da183beda900609ea6fd5df060b50 (patch) | |
tree | 52187373f7850af59f99ebd13f0571d00bb51e68 | |
parent | 8b81d29f2fd233d672bce32720f12c26fd459eda (diff) | |
download | navit-93d74f9b922da183beda900609ea6fd5df060b50.tar.gz |
Fixing redraw of menus when going back from a submenu (if no window resize has been done in the meantime)
-rw-r--r-- | navit/gui/internal/gui_internal_menu.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/navit/gui/internal/gui_internal_menu.c b/navit/gui/internal/gui_internal_menu.c index be6482219..dda458fd5 100644 --- a/navit/gui/internal/gui_internal_menu.c +++ b/navit/gui/internal/gui_internal_menu.c @@ -119,19 +119,19 @@ static void gui_internal_prune_menu_do(struct gui_priv *this, struct widget *w, gui_internal_say(this, w, 0); redisplay=w->menu_data->redisplay; if (redisplay) { - wr=w->menu_data->redisplay_widget; gui_internal_menu_destroy(this, w); + wr=w->menu_data->redisplay_widget; redisplay(this, wr, wr->data); } else { /* Make sure the new menu we are going to display spawns the whole display (in case there was a resize while a submenu was being displayed) */ - if (gui_internal_menu_needs_resizing(this, w, this->root.w, this->root.h)) { - /* If the foremost widget is a HTML menu, reload & redraw it from its href using gui_internal_widget_reload_href() */ - if (!gui_internal_widget_reload_href(this,w)) { - /* If not, resize the foremost widget */ - gui_internal_menu_resize(this, this->root.w, this->root.h); - } - gui_internal_menu_render(this); + w->w=this->root.w; + w->h=this->root.h; + /* If the foremost widget is a HTML menu, reload & redraw it from its href using gui_internal_widget_reload_href() */ + if (!gui_internal_widget_reload_href(this,w)) { + /* If not, resize the foremost widget */ + gui_internal_menu_resize(this, this->root.w, this->root.h); } + gui_internal_menu_render(this); } return; } else |