From 32553c978898932aaf0c49690ae90a4fdc3462e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 13 Jun 2006 10:14:13 +0000 Subject: [PATCH] If the supertype has the same label as the subtype, they are no longer considered equal in the _MakeTypesUnique() method. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17813 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/filetypes/MimeTypeListView.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);