Fix empty description when only one extension is given

This commit is contained in:
Milan Burda 2018-05-15 22:28:28 +02:00
parent 8fa48d1c04
commit 9d9d6ca20b

View file

@ -168,10 +168,10 @@ file_dialog::Filters GetFileTypesFromAcceptType(
filters.push_back(file_dialog::Filter()); filters.push_back(file_dialog::Filter());
if (valid_type_count > 1 || if (valid_type_count > 1 || (valid_type_count == 1 && description.empty()))
(valid_type_count == 1 && description.empty() && extensions.size() > 1))
description = "Custom Files"; description = "Custom Files";
DCHECK(!description.empty());
filters[0].first = description; filters[0].first = description;
for (const auto& extension : extensions) { for (const auto& extension : extensions) {