Close Shape Gallery dialog by pressing ESC on keyboard
This commit is contained in:
parent
d599c85477
commit
93347f0452
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ GalleryDialog::GalleryDialog(wxWindow* parent, bool modify_gallery/* = false*/)
|
||||||
ok_btn->SetToolTip(_L("Add selected shape(s) to the bed"));
|
ok_btn->SetToolTip(_L("Add selected shape(s) to the bed"));
|
||||||
}
|
}
|
||||||
static_cast<wxButton*>(FindWindowById(wxID_CLOSE, this))->Bind(wxEVT_BUTTON, [this](wxCommandEvent&){ this->EndModal(wxID_CLOSE); });
|
static_cast<wxButton*>(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,
|
auto add_btn = [this, buttons]( size_t pos, int& ID, wxString title, wxString tooltip,
|
||||||
void (GalleryDialog::* method)(wxEvent&),
|
void (GalleryDialog::* method)(wxEvent&),
|
||||||
std::function<bool()> enable_fn = []() {return true; }) {
|
std::function<bool()> enable_fn = []() {return true; }) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue