FIX: Filament preset is the same with the first one

Jira: STUDIO-4519

Filament preset is the same wit the first one, it should align with the
last one.

Signed-off-by: wenjie.guo <wenjie.guo@bambulab.com>
Change-Id: I304d0ff0fbc1c8948d410ea552e4d42b6a4e8fd9
This commit is contained in:
wenjie.guo 2023-11-16 17:14:32 +08:00 committed by Lane.Wei
parent eb6f28be93
commit 4e0c22f798

View File

@ -1453,10 +1453,12 @@ void Sidebar::on_filaments_change(size_t num_filaments)
{ {
PlaterPresetComboBox* choice/*{ nullptr }*/; PlaterPresetComboBox* choice/*{ nullptr }*/;
init_filament_combo(&choice, i); init_filament_combo(&choice, i);
int last_selection = choices.back()->GetSelection();
choices.push_back(choice); choices.push_back(choice);
// initialize selection // initialize selection
choice->update(); choice->update();
choice->SetSelection(last_selection);
++i; ++i;
} }