1
0
mirror of https://github.com/minetest/minetest.git synced 2024-11-10 12:20:39 +01:00

Fix error when enabling texture packs (#13829)

This commit is contained in:
Gregor Parzefall 2023-09-23 18:20:23 +02:00 committed by GitHub
parent c247761213
commit 4cf900c779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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