mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 05:10:38 +08:00
Merge pull request #4585 from slic3r/use-choice
Use wxChoice instead of wxComboBox with readonly if the readonly bit …
This commit is contained in:
commit
67acbca341
@ -223,9 +223,14 @@ sub BUILD {
|
|||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
my $style = 0;
|
my $style = 0;
|
||||||
$style |= wxCB_READONLY if defined $self->option->gui_type && $self->option->gui_type ne 'select_open';
|
my $field = 0;
|
||||||
my $field = Wx::ComboBox->new($self->parent, -1, "", wxDefaultPosition, $self->_default_size,
|
if (defined $self->option->gui_type && $self->option->gui_type ne 'select_open') {
|
||||||
$self->option->labels || $self->option->values || [], $style);
|
$field = Wx::Choice->new($self->parent, -1, wxDefaultPosition, $self->_default_size,
|
||||||
|
$self->option->labels || $self->option->values || [], $style);
|
||||||
|
} else {
|
||||||
|
$field = Wx::ComboBox->new($self->parent, -1, "", wxDefaultPosition, $self->_default_size,
|
||||||
|
$self->option->labels || $self->option->values || [], $style);
|
||||||
|
}
|
||||||
$self->wxWindow($field);
|
$self->wxWindow($field);
|
||||||
|
|
||||||
$self->set_value($self->option->default);
|
$self->set_value($self->option->default);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user