Perform natural sorting on file names before plotting profiles

This commit is contained in:
2011-09-22 15:42:45 +00:00
parent 45f076bef8
commit 079fd24c12
3 changed files with 25 additions and 6 deletions

View File

@ -672,7 +672,11 @@ void TrimSPGUI::PlotProfiles()
this,
"Select RGE files dialog",
"Choose RGE file to plot");
my @files = @$files_ref;
my @files_tmp = @$files_ref;
# Do "natural" sorting on the file name list
# This will produce (hopefully) a plot with largest needed depth scale
my @files = grep {s/(^|\D)0+(\d)/$1$2/g,1} sort grep {s/(\d+)/sprintf"%06.6d",$1/ge,1} @files_tmp;
my $filenames=join(",",@files);
if ($filenames ne "" ) {