diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 69eab8820..0a6eacab8 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -85,6 +85,12 @@ sub new { }); EVT_BUTTON($self, $self->{btn_save_preset}, sub { + + # since buttons (and choices too) don't get focus on Mac, we set focus manually + # to the treectrl so that the EVT_* events are fired for the input field having + # focus currently. is there anything better than this? + $self->{treectrl}->SetFocus; + my $preset = $self->current_preset; my $default_name = $preset->{default} ? 'Untitled' : basename($preset->{name}); $default_name =~ s/\.ini$//i;