mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fix of
"Unicode char like for example "ł" crush app when used in profile name" https://github.com/prusa3d/Slic3r/issues/388 The Prusa3D binary builds are missing the UTF8 libraries. To avoid having to bundle them, the case sensitive regexes testing file suffixes were replaced with explicit enumeration of lower / upper case letters. While crude, it avoids triggering the UTF8 library.
This commit is contained in:
parent
32213ce679
commit
6f28818f87
13 changed files with 26 additions and 22 deletions
|
@ -703,7 +703,7 @@ sub load_files {
|
|||
# One of the files is potentionally a bundle of files. Don't bundle them, but load them one by one.
|
||||
# Only bundle .stls or .objs if the printer has multiple extruders.
|
||||
my $one_by_one = (@$nozzle_dmrs <= 1) || (@$input_files == 1) ||
|
||||
defined(first { $_ =~ /.amf$/i || $_ =~ /.3mf$/i || $_ =~ /.prusa$/i } @$input_files);
|
||||
defined(first { $_ =~ /.[aA][mM][fF]$/ || $_ =~ /.3[mM][fF]$/ || $_ =~ /.[pP][rR][uI][sS][aA]$/ } @$input_files);
|
||||
|
||||
my $process_dialog = Wx::ProgressDialog->new('Loading…', "Processing input file\n" . basename($input_files->[0]), 100, $self, 0);
|
||||
$process_dialog->Pulse;
|
||||
|
@ -1660,7 +1660,7 @@ sub _get_export_file {
|
|||
my $output_file = $main::opt{output};
|
||||
{
|
||||
$output_file = $self->{print}->output_filepath($output_file);
|
||||
$output_file =~ s/\.gcode$/$suffix/i;
|
||||
$output_file =~ s/\.[gG][cC][oO][dD][eE]$/$suffix/;
|
||||
my $dlg = Wx::FileDialog->new($self, "Save $format file as:", dirname($output_file),
|
||||
basename($output_file), &Slic3r::GUI::MODEL_WILDCARD, wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
if ($dlg->ShowModal != wxID_OK) {
|
||||
|
@ -2194,7 +2194,7 @@ sub OnDropFiles {
|
|||
@_ = ();
|
||||
|
||||
# only accept STL, OBJ and AMF files
|
||||
return 0 if grep !/\.(?:stl|obj|amf(?:\.xml)?|prusa)$/i, @$filenames;
|
||||
return 0 if grep !/\.(?:[sS][tT][lL]|[oO][bB][jJ]|[aA][mM][fF](?:\.[xX][mM][lL])?|[pP][rR][uU][sS][aA])$/, @$filenames;
|
||||
|
||||
$self->{window}->load_files($filenames);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue