mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 00:36:24 +08:00
Use wxChoice instead of wxComboBox with readonly if the readonly bit is set for select_open types.
Fixes #4584 (UX issue on MacOS with wxCombobox/wxChoice)
This commit is contained in:
parent
4ae028a770
commit
1a92aeec2a
@ -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