diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a0d7d17f2a..ccb82b011f 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -309,6 +309,13 @@ void Tab::create_preset_tab() // This helps to process all the cursor key events on Windows in the tree control, // so that the cursor jumps to the last item. m_treectrl->Bind(wxEVT_TREE_SEL_CHANGED, [this](wxTreeEvent&) { +#ifdef __linux__ + // Events queue is opposite On Linux. wxEVT_SET_FOCUS invokes after wxEVT_TREE_SEL_CHANGED, + // and a result wxEVT_KILL_FOCUS doesn't invoke for the TextCtrls. + // see https://github.com/prusa3d/PrusaSlicer/issues/5720 + // So, call SetFocus explicitly for this control before changing of the selection + m_treectrl->SetFocus(); +#endif if (!m_disable_tree_sel_changed_event && !m_pages.empty()) { if (m_page_switch_running) m_page_switch_planned = true;