Fix empty description when only one extension is given
This commit is contained in:
parent
8fa48d1c04
commit
9d9d6ca20b
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue