A couple fixes for Windows
This commit is contained in:
parent
ae9f13ed54
commit
cb0ee9729f
2 changed files with 5 additions and 2 deletions
lib/Slic3r/GUI
|
@ -139,7 +139,6 @@ sub new {
|
||||||
export_gcode cog_go.png
|
export_gcode cog_go.png
|
||||||
export_stl brick_go.png
|
export_stl brick_go.png
|
||||||
|
|
||||||
info package.png
|
|
||||||
increase add.png
|
increase add.png
|
||||||
decrease delete.png
|
decrease delete.png
|
||||||
rotate45cw arrow_rotate_clockwise.png
|
rotate45cw arrow_rotate_clockwise.png
|
||||||
|
@ -147,6 +146,8 @@ sub new {
|
||||||
rotate arrow_rotate_clockwise.png
|
rotate arrow_rotate_clockwise.png
|
||||||
changescale arrow_out.png
|
changescale arrow_out.png
|
||||||
split shape_ungroup.png
|
split shape_ungroup.png
|
||||||
|
view package.png
|
||||||
|
settings cog.png
|
||||||
);
|
);
|
||||||
for (grep $self->{"btn_$_"}, keys %icons) {
|
for (grep $self->{"btn_$_"}, keys %icons) {
|
||||||
$self->{"btn_$_"}->SetBitmap(Wx::Bitmap->new("$Slic3r::var/$icons{$_}", wxBITMAP_TYPE_PNG));
|
$self->{"btn_$_"}->SetBitmap(Wx::Bitmap->new("$Slic3r::var/$icons{$_}", wxBITMAP_TYPE_PNG));
|
||||||
|
|
|
@ -73,7 +73,9 @@ sub new {
|
||||||
# create the button
|
# create the button
|
||||||
my $btn = Wx::BitmapButton->new($self, -1, Wx::Bitmap->new("$Slic3r::var/add.png", wxBITMAP_TYPE_PNG));
|
my $btn = Wx::BitmapButton->new($self, -1, Wx::Bitmap->new("$Slic3r::var/add.png", wxBITMAP_TYPE_PNG));
|
||||||
EVT_BUTTON($self, $btn, sub {
|
EVT_BUTTON($self, $btn, sub {
|
||||||
my $opt_key = $self->{options}[$choice->GetSelection];
|
my $idx = $choice->GetSelection;
|
||||||
|
return if $idx == -1; # lack of selected item, can happen on Windows
|
||||||
|
my $opt_key = $self->{options}[$idx];
|
||||||
$self->{object}->config->apply(Slic3r::Config->new_from_defaults($opt_key));
|
$self->{object}->config->apply(Slic3r::Config->new_from_defaults($opt_key));
|
||||||
$self->update_optgroup;
|
$self->update_optgroup;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue