Perform natural sorting on file names before plotting profiles
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'TrimSPGUI.ui'
|
||||
#
|
||||
# Created: Thu Aug 11 16:45:18 2011
|
||||
# Created: Thu Sep 22 17:41:56 2011
|
||||
# by: The PerlQt User Interface Compiler (puic)
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -2692,7 +2692,11 @@ sub 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 "" ) {
|
||||
|
Reference in New Issue
Block a user