Patch from Jim Wilson:
Property sort now leaves "." and ".." at top of subdirectory list in their expected sequence.
This commit is contained in:
parent
e71873f4ad
commit
b4eb6324aa
1 changed files with 6 additions and 1 deletions
|
@ -501,10 +501,13 @@ void fgPropPicker::find_props ()
|
||||||
|
|
||||||
files [ num_files ] = NULL ;
|
files [ num_files ] = NULL ;
|
||||||
|
|
||||||
|
// leave the . and .. alone...
|
||||||
|
int ii = ( strcmp(files [0], "." ) == 0 ) ? 2 : 0;
|
||||||
|
|
||||||
// Sort the entries. This is a simple N^2 extraction sort. More
|
// Sort the entries. This is a simple N^2 extraction sort. More
|
||||||
// elaborate algorithms aren't necessary for the few dozen
|
// elaborate algorithms aren't necessary for the few dozen
|
||||||
// properties we're going to sort.
|
// properties we're going to sort.
|
||||||
for(i=0; i<num_files; i++) {
|
for(i=ii; i<num_files; i++) {
|
||||||
int j, min = i;
|
int j, min = i;
|
||||||
char df, *tmp;
|
char df, *tmp;
|
||||||
for(j=i+1; j<num_files; j++)
|
for(j=i+1; j<num_files; j++)
|
||||||
|
@ -603,3 +606,5 @@ fgPropEdit::fgPropEdit ( char *name, char *value, char *proppath ) : puDialogBox
|
||||||
|
|
||||||
FG_FINALIZE_PUI_DIALOG( this );
|
FG_FINALIZE_PUI_DIALOG( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue