diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp index f5e3083a78..2aba75fbac 100644 --- a/src/slic3r/GUI/GalleryDialog.cpp +++ b/src/slic3r/GUI/GalleryDialog.cpp @@ -101,7 +101,7 @@ GalleryDialog::GalleryDialog(wxWindow* parent, bool modify_gallery/* = false*/) ok_btn->SetToolTip(_L("Add selected shape(s) to the bed")); } static_cast(FindWindowById(wxID_CLOSE, this))->Bind(wxEVT_BUTTON, [this](wxCommandEvent&){ this->EndModal(wxID_CLOSE); }); - + this->SetEscapeId(wxID_CLOSE); auto add_btn = [this, buttons]( size_t pos, int& ID, wxString title, wxString tooltip, void (GalleryDialog::* method)(wxEvent&), std::function enable_fn = []() {return true; }) {