mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-20 22:20:50 +00:00
Sort listbox items using compare_filenames() to compare numbers correctly (fix #782)
This commit is contained in:
parent
c03f6b4da4
commit
4b21d8d5f4
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "ui/listbox.h"
|
#include "ui/listbox.h"
|
||||||
|
|
||||||
|
#include "base/path.h"
|
||||||
#include "ui/listitem.h"
|
#include "ui/listitem.h"
|
||||||
#include "ui/message.h"
|
#include "ui/message.h"
|
||||||
#include "ui/preferred_size_event.h"
|
#include "ui/preferred_size_event.h"
|
||||||
@ -123,7 +124,7 @@ void ListBox::centerScroll()
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool sort_by_text(Widget* a, Widget* b) {
|
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()
|
void ListBox::sortItems()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user