lua: Fix dialog dropdowns that are empty by default on Mac

This commit is contained in:
arch1t3cht 2023-10-13 00:32:36 +02:00
parent ad92ccf01a
commit a631bf192c
1 changed files with 6 additions and 0 deletions

View File

@ -326,6 +326,12 @@ namespace Automation4 {
{
lua_getfield(L, -1, "items");
read_string_array(L, items);
#ifdef __WXMAC__
if (std::find(items.begin(), items.end(), value) == items.end()) {
items.insert(items.begin(), value);
}
#endif
}
bool CanSerialiseValue() const override { return true; }