mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 14:42:24 +01:00
Fix empty tables / text lists emitting row events (#14955)
Also makes these elements no longer show a selected nonexisting row
This commit is contained in:
parent
dfb23c8db0
commit
20afc762cc
@ -1188,7 +1188,9 @@ void GUIFormSpecMenu::parseTable(parserData* data, const std::string &element)
|
||||
std::vector<std::string> v_pos = split(parts[0],',');
|
||||
std::vector<std::string> v_geom = split(parts[1],',');
|
||||
std::string name = parts[2];
|
||||
std::vector<std::string> items = split(parts[3],',');
|
||||
std::vector<std::string> items;
|
||||
if (!parts[3].empty())
|
||||
items = split(parts[3],',');
|
||||
std::string str_initial_selection;
|
||||
|
||||
if (parts.size() >= 5)
|
||||
@ -1258,7 +1260,9 @@ void GUIFormSpecMenu::parseTextList(parserData* data, const std::string &element
|
||||
std::vector<std::string> v_pos = split(parts[0],',');
|
||||
std::vector<std::string> v_geom = split(parts[1],',');
|
||||
std::string name = parts[2];
|
||||
std::vector<std::string> items = split(parts[3],',');
|
||||
std::vector<std::string> items;
|
||||
if (!parts[3].empty())
|
||||
items = split(parts[3],',');
|
||||
std::string str_initial_selection;
|
||||
std::string str_transparent = "false";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user