mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
FIX: support raft filament choice not correct after changing filament color
Jira: STUDIO-14092 Change-Id: Ida78c86dc7bb607d4cfdb4a6c4a6644ff9c7eb69 (cherry picked from commit 7c0c20ab20f1b1c0816a98227ffaf1bc1d9ff1ce)
This commit is contained in:
@@ -761,11 +761,17 @@ struct DynamicFilamentList : DynamicList
|
||||
for (auto i : items) {
|
||||
cb->Append(i.first, i.second ? *i.second : wxNullBitmap);
|
||||
}
|
||||
int new_index = cb->FindString(old_selection);
|
||||
if (new_index != wxNOT_FOUND) {
|
||||
cb->SetSelection(new_index);
|
||||
} else if ((unsigned int) old_index < cb->GetCount()) {
|
||||
|
||||
if (old_index >= 0 && (unsigned int) old_index < cb->GetCount()) {
|
||||
cb->SetSelection(old_index);
|
||||
return;
|
||||
}
|
||||
|
||||
int new_index = cb->FindString(old_selection);
|
||||
if (old_index == cb->GetCount()) {
|
||||
cb->SetSelection(old_index - 1);
|
||||
} else if (new_index != wxNOT_FOUND) {
|
||||
cb->SetSelection(new_index);
|
||||
} else {
|
||||
cb->SetSelection(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user