diff --git a/src/preferences/filetypes/MimeTypeListView.cpp b/src/preferences/filetypes/MimeTypeListView.cpp index a720a59b99..99f986c55c 100644 --- a/src/preferences/filetypes/MimeTypeListView.cpp +++ b/src/preferences/filetypes/MimeTypeListView.cpp @@ -286,6 +286,9 @@ MimeTypeItem::Compare(const BListItem* a, const BListItem* b) int MimeTypeItem::CompareLabels(const BListItem* a, const BListItem* b) { + if (a->OutlineLevel() != b->OutlineLevel()) + return a->OutlineLevel() - b->OutlineLevel(); + const MimeTypeItem* typeA = dynamic_cast(a); const MimeTypeItem* typeB = dynamic_cast(b);