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:
David Martínez Moreno
2026-04-24 01:52:25 -07:00
committed by GitHub
parent 66eb5fc4f4
commit b30470a714
2 changed files with 5 additions and 3 deletions

View File

@@ -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 ""

View File

@@ -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();
} }
} }