From b30470a714b0e467e7793f6ae714fd63f9610b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mart=C3=ADnez=20Moreno?= Date: Fri, 24 Apr 2026 01:52:25 -0700 Subject: [PATCH] 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. --- localization/i18n/en/OrcaSlicer_en.po | 2 +- src/slic3r/GUI/GUI_ObjectTable.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/localization/i18n/en/OrcaSlicer_en.po b/localization/i18n/en/OrcaSlicer_en.po index b1b8aad458..b0b7dced49 100644 --- a/localization/i18n/en/OrcaSlicer_en.po +++ b/localization/i18n/en/OrcaSlicer_en.po @@ -2614,7 +2614,7 @@ msgid "Brim" msgstr "" msgid "Object/Part Setting" -msgstr "Object/part setting" +msgstr "Object/part settings" msgid "Reset parameter" msgstr "" diff --git a/src/slic3r/GUI/GUI_ObjectTable.cpp b/src/slic3r/GUI/GUI_ObjectTable.cpp index 4fc40db74b..71174665e1 100644 --- a/src/slic3r/GUI/GUI_ObjectTable.cpp +++ b/src/slic3r/GUI/GUI_ObjectTable.cpp @@ -3277,7 +3277,7 @@ void ObjectTablePanel::msw_rescale() { // ObjectTableDialog // ---------------------------------------------------------------------------- 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) { @@ -3410,7 +3410,9 @@ void ObjectTableDialog::OnClose(wxCloseEvent &evt) void ObjectTableDialog::OnText(wxKeyEvent &evt) { - if (evt.GetKeyCode() != WXK_ESCAPE) { + if (evt.GetKeyCode() == WXK_ESCAPE) { + Close(); + } else { evt.Skip(); } }