From 522951034656686a7d079883e0db3e015da47590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Tue, 29 Oct 2024 12:43:17 +0100 Subject: [PATCH] SPE-2514: Prevents focusing on the menu bar when ALT is pressed in painting gizmos. --- src/slic3r/GUI/GLCanvas3D.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 8c9e028487..b7777f9105 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3146,7 +3146,13 @@ void GLCanvas3D::on_key(wxKeyEvent& evt) } } - if (keyCode != WXK_TAB + const GLGizmosManager::EType gizmo_type = m_gizmos.get_current_type(); + if (keyCode == WXK_ALT && (gizmo_type == GLGizmosManager::FdmSupports || + gizmo_type == GLGizmosManager::Seam || + gizmo_type == GLGizmosManager::MmuSegmentation)) { + // Prevents focusing on the menu bar when ALT is pressed in painting gizmos (FdmSupports, Seam, and MmuSegmentation). + evt.Skip(false); + } else if (keyCode != WXK_TAB && keyCode != WXK_LEFT && keyCode != WXK_UP && keyCode != WXK_RIGHT