mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Fix the OnText handler in ObjectTableDialog to close on Esc. (#12979)
The OnText handler in ObjectTableDialog catches WXK_ESCAPE but swallows it. Invert the logic to call Close() on Esc, and pass anything else to evt.Skip(). While at it, fix a typo in the dialog's title.
This commit is contained in:
committed by
GitHub
parent
66eb5fc4f4
commit
b30470a714
@@ -2614,7 +2614,7 @@ msgid "Brim"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Object/Part Setting"
|
msgid "Object/Part Setting"
|
||||||
msgstr "Object/part setting"
|
msgstr "Object/part settings"
|
||||||
|
|
||||||
msgid "Reset parameter"
|
msgid "Reset parameter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -3277,7 +3277,7 @@ void ObjectTablePanel::msw_rescale() {
|
|||||||
// ObjectTableDialog
|
// ObjectTableDialog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
ObjectTableDialog::ObjectTableDialog(wxWindow* parent, Plater* platerObj, Model *modelObj, wxSize maxSize)
|
ObjectTableDialog::ObjectTableDialog(wxWindow* parent, Plater* platerObj, Model *modelObj, wxSize maxSize)
|
||||||
: GUI::DPIDialog(parent, wxID_ANY, _L("Object/Part Setting"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
|
: GUI::DPIDialog(parent, wxID_ANY, _L("Object/Part Settings"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
|
||||||
,
|
,
|
||||||
m_model(modelObj), m_plater(platerObj)
|
m_model(modelObj), m_plater(platerObj)
|
||||||
{
|
{
|
||||||
@@ -3410,7 +3410,9 @@ void ObjectTableDialog::OnClose(wxCloseEvent &evt)
|
|||||||
|
|
||||||
void ObjectTableDialog::OnText(wxKeyEvent &evt)
|
void ObjectTableDialog::OnText(wxKeyEvent &evt)
|
||||||
{
|
{
|
||||||
if (evt.GetKeyCode() != WXK_ESCAPE) {
|
if (evt.GetKeyCode() == WXK_ESCAPE) {
|
||||||
|
Close();
|
||||||
|
} else {
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user