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)
This commit is contained in:
Noisyfox 2025-04-05 23:21:36 +08:00 committed by GitHub
parent 85d46d2979
commit ecd91bcf01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();