mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 17:11:48 +08:00
Prevent race conditions when loading files into GUI from command line
This commit is contained in:
parent
5821f040c4
commit
7355d39584
14
slic3r.pl
14
slic3r.pl
@ -112,12 +112,14 @@ if ((!@ARGV || $opt{gui}) && !$opt{save} && eval "require Slic3r::GUI; 1") {
|
||||
}
|
||||
$gui = Slic3r::GUI->new;
|
||||
setlocale(LC_NUMERIC, 'C');
|
||||
$gui->{mainframe}->load_config_file($_) for @{$opt{load}};
|
||||
$gui->{mainframe}->load_config($cli_config);
|
||||
foreach my $input_file (@ARGV) {
|
||||
$input_file = Slic3r::decode_path($input_file);
|
||||
$gui->{mainframe}{plater}->load_file($input_file) unless $opt{no_plater};
|
||||
}
|
||||
$gui->CallAfter(sub {
|
||||
$gui->{mainframe}->load_config_file($_) for @{$opt{load}};
|
||||
$gui->{mainframe}->load_config($cli_config);
|
||||
foreach my $input_file (@ARGV) {
|
||||
$input_file = Slic3r::decode_path($input_file);
|
||||
$gui->{mainframe}{plater}->load_file($input_file) unless $opt{no_plater};
|
||||
}
|
||||
});
|
||||
$gui->MainLoop;
|
||||
exit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user