From ecd91bcf01938a089b9138b1f66869c0ce44876c Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sat, 5 Apr 2025 23:21:36 +0800 Subject: [PATCH] Make sure sidebar is not triggered by child notebook tab changes (#8934) * Make sure sidebar is not triggered by child notebook tab changes such as AMS group selection (SoftFever/OrcaSlicer#8656) --- src/slic3r/GUI/Plater.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index a99ace52f7..9a9217139d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -7280,6 +7280,12 @@ void Plater::priv::on_action_print_plate_from_sdcard(SimpleEvent&) void Plater::priv::on_tab_selection_changing(wxBookCtrlEvent& e) { + // Ignore event raised by child controls + if (!(main_frame->m_tabpanel && e.GetId() == main_frame->m_tabpanel->GetId())) { + e.Skip(); + return; + } + const int new_sel = e.GetSelection(); sidebar_layout.show = new_sel == MainFrame::tp3DEditor || new_sel == MainFrame::tpPreview; update_sidebar();