Fix filament editor crash on Linux (#9016)

Fix filament editor crash on Linux (SoftFever/OrcaSlicer#8895)
This commit is contained in:
Noisyfox 2025-03-30 22:02:36 +08:00 committed by GitHub
parent 9fe905c47d
commit c163d11fdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -796,15 +796,6 @@ bool PlaterPresetComboBox::switch_to_tab()
if (!tab)
return false;
//BBS Select NoteBook Tab params
if (tab->GetParent() == wxGetApp().params_panel())
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
else {
wxGetApp().params_dialog()->Popup();
tab->OnActivate();
}
tab->restore_last_select_item();
const Preset* selected_filament_preset = nullptr;
if (m_type == Preset::TYPE_FILAMENT)
{
@ -815,7 +806,6 @@ bool PlaterPresetComboBox::switch_to_tab()
if (wxGetApp().get_tab(m_type)->select_preset(preset_name))
wxGetApp().get_tab(m_type)->get_combo_box()->set_filament_idx(m_filament_idx);
else {
wxGetApp().params_dialog()->Hide();
return false;
}
}
@ -843,6 +833,15 @@ bool PlaterPresetComboBox::switch_to_tab()
}
*/
//BBS Select NoteBook Tab params
if (tab->GetParent() == wxGetApp().params_panel())
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
else {
wxGetApp().params_dialog()->Popup();
tab->OnActivate();
}
tab->restore_last_select_item();
return true;
}