mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
ENH:close dialog by pressing esc key
Change-Id: Ib883e7119699e06f63c61dd083ad761ba58bc19c
This commit is contained in:
parent
03f62ed9ae
commit
121dccc59c
7 changed files with 92 additions and 3 deletions
|
@ -172,6 +172,16 @@ WipingDialog::WipingDialog(wxWindow* parent, const std::vector<float>& matrix, c
|
|||
this->FindWindowById(wxID_RESET, this)->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { m_panel_wiping->calc_flushing_volumes(); });
|
||||
}
|
||||
this->Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& e) { EndModal(wxCANCEL); });
|
||||
this->Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
|
||||
if (e.GetKeyCode() == WXK_ESCAPE) {
|
||||
if (this->IsModal())
|
||||
this->EndModal(wxID_CANCEL);
|
||||
else
|
||||
this->Close();
|
||||
}
|
||||
else
|
||||
e.Skip();
|
||||
});
|
||||
}
|
||||
|
||||
void WipingPanel::create_panels(wxWindow* parent, const int num) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue