menubar: Fix refresh without show
When menubar.refresh() is called, it tries to update the menubar widget. The call chain looks like this: menulist_update -> common.list_update -> get_current_page. get_current_page then tries to query information about the size of the menubar. Since there is not much point in this, just skip the whole callback in this case. Side note: What is the point of menubar.get()? It seems quite useless to me. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7f3ff5f26f
commit
dadf8463bd
|
@ -350,7 +350,9 @@ end
|
||||||
function menubar.refresh(scr)
|
function menubar.refresh(scr)
|
||||||
menubar.menu_gen.generate(function(entries)
|
menubar.menu_gen.generate(function(entries)
|
||||||
menubar.menu_entries = entries
|
menubar.menu_entries = entries
|
||||||
|
if instance then
|
||||||
menulist_update(nil, scr)
|
menulist_update(nil, scr)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue