Fix:Ignore multiple menu calls
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 15 Dec 2009 14:04:58 +0000 (14:04 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 15 Dec 2009 14:04:58 +0000 (14:04 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2874 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/gui/internal/gui_internal.c

index a2db083..adc5a6c 100644 (file)
@@ -4011,6 +4011,8 @@ gui_internal_cmd_menu(struct gui_priv *this, struct point *p, int ignore)
 static void
 gui_internal_cmd_menu2(struct gui_priv *this)
 {
+       if (this->root.children)
+               return;
        gui_internal_cmd_menu(this, NULL, 0);
 }
 
@@ -4274,9 +4276,13 @@ static void gui_internal_resize(void *data, int w, int h)
        }
        dbg(1,"w=%d h=%d children=%p\n", w, h, this->root.children);
        navit_handle_resize(this->nav, w, h);
-       if (this->root.children && changed) {
-               gui_internal_prune_menu(this, NULL);
-               gui_internal_menu_root(this);
+       if (this->root.children) {
+               if (changed) {
+                       gui_internal_prune_menu(this, NULL);
+                       gui_internal_menu_root(this);
+               } else {
+                       gui_internal_menu_render(this);
+               }
        }
 }