From cf9433467b212648e654e84021f22780296b7488 Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 19 Jun 2008 18:22:51 +0000 Subject: [PATCH] Fix:gui_internal:Avoid popping up the menu when resizing with an active map git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1148 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/gui/internal/gui_internal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/navit/navit/gui/internal/gui_internal.c b/navit/navit/gui/internal/gui_internal.c index 45ada2a..b6faef4 100644 --- a/navit/navit/gui/internal/gui_internal.c +++ b/navit/navit/gui/internal/gui_internal.c @@ -1375,7 +1375,7 @@ static void gui_internal_button(void *data, int pressed, int button, struct poin struct graphics *gra=this->gra; // if still on the map (not in the menu, yet): - if (!this->root.children) { + if (!this->root.children) { // check whether the position of the mouse changed during press/release OR if it is the scrollwheel if (!navit_handle_button(this->nav, pressed, button, p, NULL) || button >=4) // Maybe there's a better way to do this return; @@ -1425,8 +1425,10 @@ static void gui_internal_resize(void *data, int w, int h) this->root.h=h; dbg(0,"w=%d h=%d\n", w, h); navit_resize(this->nav, w, h); - gui_internal_prune_menu(this, NULL); - gui_internal_menu_root(this); + if (this->root.children) { + gui_internal_prune_menu(this, NULL); + gui_internal_menu_root(this); + } } //############################################################################################################## -- 2.7.4