From 93347f0452bdee3a6bfc5023af533cda97c1707f Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 11 Nov 2021 13:03:40 +0100 Subject: [PATCH] Close Shape Gallery dialog by pressing ESC on keyboard --- src/slic3r/GUI/GalleryDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp index f5e3083a7..2aba75fba 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; }) {