Commit 16f41764 authored by twanvl's avatar twanvl

Fixed: 'Enter' to accept choice in new set dialog box doesn't work.

parent 0fcd6e5f
...@@ -161,6 +161,16 @@ void GalleryList::onChar(wxKeyEvent& ev) { ...@@ -161,6 +161,16 @@ void GalleryList::onChar(wxKeyEvent& ev) {
nev.SetDirection(!ev.ShiftDown()); nev.SetDirection(!ev.ShiftDown());
GetParent()->ProcessEvent(nev); GetParent()->ProcessEvent(nev);
} break; } break;
case WXK_RETURN: {
// same thing: press dialog box default button
wxButton* btn = wxDynamicCast(GetParent()->GetDefaultItem(), wxButton);
if ( btn && btn->IsEnabled() ) {
// if we do have a default button, do press it
wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, btn->GetId());
btn->ProcessEvent(evt);
}
}break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment