Fixed sorting in Fl_Browser - last item would not be sorted (STR #2300)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7103 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
b416a027cf
commit
0ec12cc9c4
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.3.0
|
||||
|
||||
- Fixed sorting in Fl_Browser - last item would not
|
||||
be sorted (STR #2300)
|
||||
- Fixed window levels in OS X Cocoa (STR #2316)
|
||||
- Added jpeg support to Fluid image() element
|
||||
- Added loading jpeg images from memory
|
||||
|
@ -962,7 +962,7 @@ void Fl_Browser_::sort(int flags) {
|
||||
a = item_next(a);
|
||||
n++;
|
||||
}
|
||||
for (i=n-1; i>0; i--) {
|
||||
for (i=n; i>0; i--) {
|
||||
char swapped = 0;
|
||||
a = item_first();
|
||||
b = item_next(a);
|
||||
@ -981,6 +981,7 @@ void Fl_Browser_::sort(int flags) {
|
||||
swapped = 1;
|
||||
}
|
||||
}
|
||||
if (!c) break;
|
||||
b = c; a = item_prev(b);
|
||||
}
|
||||
if (!swapped)
|
||||
|
Loading…
Reference in New Issue
Block a user