mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Adapt GUI to new XS Config
This commit is contained in:
@@ -381,9 +381,17 @@ sub _set_config {
|
||||
my ($opt_key, $index, $value) = @_;
|
||||
|
||||
my ($get_m, $serialized) = $self->_config_methods($opt_key, $index);
|
||||
defined $index
|
||||
? $self->config->$get_m($opt_key)->[$index] = $value
|
||||
: $self->config->set($opt_key, $value, $serialized);
|
||||
if (defined $index) {
|
||||
my $values = $self->config->$get_m($opt_key);
|
||||
$values->[$index] = $value;
|
||||
$self->config->set($opt_key, $values);
|
||||
} else {
|
||||
if ($serialized) {
|
||||
$self->config->set_deserialize($opt_key, $value);
|
||||
} else {
|
||||
$self->config->set($opt_key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub _config_methods {
|
||||
|
||||
Reference in New Issue
Block a user