Yep, translating the empty string is a bad idea.
Dropdowns, table and listselect entries have 2 data elements - one is the actual data (Entry value), the other one is a translatable label (const std::string& name). You need to compare the actual data, not the translatable label.
void add(const std::string& name, Entry value, const Image* pic = nullptr, const bool select_this = false, const std::string& tooltip_text = std::string()) { entry_cache_.push_back(std::unique_ptr<Entry>(new Entry(value))); BaseDropdown::add(name, size(), pic, select_this, tooltip_text); }
« Back to merge proposal
Yep, translating the empty string is a bad idea.
Dropdowns, table and listselect entries have 2 data elements - one is the actual data (Entry value), the other one is a translatable label (const std::string& name). You need to compare the actual data, not the translatable label.
void add(const std::string& name, cache_. push_back( std::unique_ ptr<Entry> (new Entry(value))); :add(name, size(), pic, select_this, tooltip_text);
Entry value,
const Image* pic = nullptr,
const bool select_this = false,
const std::string& tooltip_text = std::string()) {
entry_
BaseDropdown:
}