From 7a1574a853111b8c069b39e145cf8d8b76042256 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 11 Jan 2021 13:11:35 +0100 Subject: [PATCH] Fix of #5720 - SL1 Printer Settings->Notes is not updated when switching tab --- src/slic3r/GUI/Tab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a0d7d17f2..ccb82b011 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;