Bugfix: a recent change broke all options having a zero value
This commit is contained in:
parent
7a5af293a8
commit
22551b64de
@ -32,7 +32,7 @@ sub new {
|
|||||||
$size = Wx::Size->new($opt->{width} || -1, $opt->{height} || -1);
|
$size = Wx::Size->new($opt->{width} || -1, $opt->{height} || -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key) || '',
|
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key),
|
||||||
Wx::wxDefaultPosition, $size, $style);
|
Wx::wxDefaultPosition, $size, $style);
|
||||||
EVT_TEXT($parent, $field, sub { Slic3r::Config->set($opt_key, $field->GetValue) });
|
EVT_TEXT($parent, $field, sub { Slic3r::Config->set($opt_key, $field->GetValue) });
|
||||||
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->get($opt_key)) };
|
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->get($opt_key)) };
|
||||||
|
Loading…
Reference in New Issue
Block a user