FIX: the preset is the same with the first one when switching printers

Jira: STUDIO-5433

Signed-off-by: wenjie.guo <wenjie.guo@bambulab.com>
Change-Id: Icf1979f2bcffbc9c59a072924df5073fc3eac363
This commit is contained in:
wenjie.guo
2023-12-14 22:08:53 +08:00
committed by Lane.Wei
parent b0842857ca
commit 270e3724a2
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -1465,12 +1465,10 @@ void Sidebar::on_filaments_change(size_t num_filaments)
{
PlaterPresetComboBox* choice/*{ nullptr }*/;
init_filament_combo(&choice, i);
int last_selection = choices.back()->GetSelection();
choices.push_back(choice);
// initialize selection
choice->update();
choice->SetSelection(last_selection);
++i;
}