Force unfocusing of all input fields when saving a preset, otherwise the currently focused one might be ignored. #750 #624
This commit is contained in:
parent
c793a2657f
commit
28b56ae840
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user