[aseprite] 09/308: Sort listbox items using compare_filenames() to compare numbers correctly (fix #782)
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:44:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 4b21d8d5f40b2c695351fd10bd64f77476e1e83b
Author: David Capello <davidcapello at gmail.com>
Date: Wed Nov 18 16:50:49 2015 -0300
Sort listbox items using compare_filenames() to compare numbers correctly (fix #782)
---
src/ui/listbox.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ui/listbox.cpp b/src/ui/listbox.cpp
index 6cbda29..f64cff7 100644
--- a/src/ui/listbox.cpp
+++ b/src/ui/listbox.cpp
@@ -10,6 +10,7 @@
#include "ui/listbox.h"
+#include "base/path.h"
#include "ui/listitem.h"
#include "ui/message.h"
#include "ui/preferred_size_event.h"
@@ -123,7 +124,7 @@ void ListBox::centerScroll()
}
inline bool sort_by_text(Widget* a, Widget* b) {
- return a->getText() < b->getText();
+ return (base::compare_filenames(a->getText(), b->getText()) < 0);
}
void ListBox::sortItems()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list