Compatibility with --load and new GUI

This commit is contained in:
Alessandro Ranellucci 2012-07-15 17:54:57 +02:00
parent e228b834e2
commit 9210c708fc
5 changed files with 90 additions and 77 deletions

View file

@ -72,8 +72,9 @@ Slic3r::Config->save($opt{save}) if $opt{save};
# start GUI
if (!@ARGV && !$opt{save} && eval "require Slic3r::GUI; 1") {
no warnings 'once';
$Slic3r::GUI::SkeinPanel::last_config = $opt{load} ? $opt{load}[0] : undef;
Slic3r::GUI->new->MainLoop;
my $gui = Slic3r::GUI->new;
$gui->{skeinpanel}->load_config($opt{load}[0]) if $opt{load};
$gui->MainLoop;
exit;
}
die $@ if $@ && $opt{gui};