1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Do not duplicate the suffixes in the formats list

This commit is contained in:
Martin Tůma 2022-01-03 23:20:03 +01:00
parent 1000dd3fc1
commit c062a62014

View File

@ -171,10 +171,14 @@ QString Data::formats()
QStringList Data::filter() QStringList Data::filter()
{ {
QStringList filter; QStringList filter;
QString last;
for (QMultiMap<QString, Parser*>::iterator it = _parsers.begin(); for (QMultiMap<QString, Parser*>::iterator it = _parsers.begin();
it != _parsers.end(); it++) it != _parsers.end(); it++) {
filter << "*." + it.key(); if (it.key() != last)
filter << "*." + it.key();
last = it.key();
}
return filter; return filter;
} }