mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix flushing windows dialog able to move around using trackpad and added esc to close dialog (#12694)
Added entry to wipingdialog.html css to prevent it from being overscrollable and its position fixed. Added escape button to close dialog event on both javascript and webview events JIRA-136
This commit is contained in:
@@ -496,6 +496,15 @@ WipingDialog::WipingDialog(wxWindow* parent, const int max_flush_volume) :
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<< "Failed to parse json message: " << message;
|
||||
}
|
||||
});
|
||||
|
||||
m_webview->Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
|
||||
if (e.GetKeyCode() == WXK_ESCAPE) {
|
||||
if (IsModal()) EndModal(wxID_CANCEL);
|
||||
else Close();
|
||||
return;
|
||||
}
|
||||
e.Skip();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user