Refactor OptionsGroup to decouple it from the config repository, add ConfigOptionsGroup

This commit is contained in:
Alessandro Ranellucci 2012-07-24 15:30:50 +02:00
parent 09a222f8b2
commit 1d364d7823
6 changed files with 290 additions and 119 deletions

View file

@ -82,12 +82,7 @@ Slic3r::Config->save($opt{save}) if $opt{save};
# apply command line options to GUI as well and start it
if ($gui) {
for my $opt_key (keys %cli_options) {
no warnings 'once';
( $Slic3r::GUI::OptionsGroup::reload_callbacks{$opt_key} || sub {} )->();
my $group = first { $opt_key ~~ @$_ } keys %Slic3r::Groups;
$gui->{skeinpanel}{options_tabs}{$group}->set_dirty(1) if $group;
}
$gui->{skeinpanel}->set_value($_, $cli_options{$_}) for keys %cli_options;
$gui->MainLoop;
exit;
}