Skip to content

Commit

Permalink
Fix empty tables / text lists emitting row events (#14955)
Browse files Browse the repository at this point in the history
Also makes these elements no longer show a selected nonexisting row
  • Loading branch information
appgurueu authored Aug 11, 2024
1 parent dfb23c8 commit 20afc76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/guiFormSpecMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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";

Expand Down

0 comments on commit 20afc76

Please sign in to comment.