Sort listbox items using compare_filenames() to compare numbers correctly (fix #782)

This commit is contained in:
David Capello 2015-11-18 16:50:49 -03:00
parent c03f6b4da4
commit 4b21d8d5f4

View File

@ -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()