mirror of
https://github.com/minetest/minetest.git
synced 2024-08-19 04:54:18 +02:00
Fix error when enabling texture packs (#13829)
This commit is contained in:
parent
c247761213
commit
4cf900c779
@ -18,11 +18,7 @@
|
||||
|
||||
local packages_raw, packages
|
||||
|
||||
local function on_change(type)
|
||||
if type ~= "ENTER" then
|
||||
return
|
||||
end
|
||||
|
||||
local function update_packages()
|
||||
if not pkgmgr.global_mods then
|
||||
pkgmgr.refresh_globals()
|
||||
end
|
||||
@ -48,7 +44,17 @@ local function on_change(type)
|
||||
is_equal, nil, {})
|
||||
end
|
||||
|
||||
local function on_change(type)
|
||||
if type == "ENTER" then
|
||||
update_packages()
|
||||
end
|
||||
end
|
||||
|
||||
local function get_formspec(tabview, name, tabdata)
|
||||
if not packages then
|
||||
update_packages()
|
||||
end
|
||||
|
||||
if not tabdata.selected_pkg then
|
||||
tabdata.selected_pkg = 1
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user