Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-08-30 17:49:12 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-08-30 17:50:11 +0300
commitec51355a47cba64e831ac8dc57f4ad9631876692 (patch)
tree9e0265b2eab53c6f93b56333561f6a5cd88f5f39
parente0c792135adf8de3e6a54ddcbab53cab95b2b019 (diff)
UI: Outliner Natural Sort
Collection contents alphabetical sort now uses a Natural Sort that takes number magnitude into account. Differential Revision: https://developer.blender.org/D5636 Reviewed by Brecht Van Lommel
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index c3168a7a532..41958656688 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1601,7 +1601,7 @@ typedef struct tTreeSort {
short idcode;
} tTreeSort;
-/* alphabetical comparator, tryping to put objects first */
+/* alphabetical comparator, trying to put objects first */
static int treesort_alpha_ob(const void *v1, const void *v2)
{
const tTreeSort *x1 = v1, *x2 = v2;
@@ -1627,7 +1627,7 @@ static int treesort_alpha_ob(const void *v1, const void *v2)
return (x1->te->flag & TE_CHILD_NOT_IN_COLLECTION) ? 1 : -1;
}
- comp = strcmp(x1->name, x2->name);
+ comp = BLI_natstrcmp(x1->name, x2->name);
if (comp > 0) {
return 1;
@@ -1659,7 +1659,7 @@ static int treesort_alpha(const void *v1, const void *v2)
const tTreeSort *x1 = v1, *x2 = v2;
int comp;
- comp = strcmp(x1->name, x2->name);
+ comp = BLI_natstrcmp(x1->name, x2->name);
if (comp > 0) {
return 1;
@@ -1697,7 +1697,7 @@ static int treesort_obtype_alpha(const void *v1, const void *v2)
}
}
else {
- int comp = strcmp(x1->name, x2->name);
+ int comp = BLI_natstrcmp(x1->name, x2->name);
if (comp > 0) {
return 1;