mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Update extruder show/hide and default extruder color in respect to the volume type
This commit is contained in:
parent
0a6490bab9
commit
8e1cde43a6
9 changed files with 133 additions and 77 deletions
|
@ -290,16 +290,11 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
|||
labelRect.GetTopLeft(), wxSize(labelRect.GetWidth(), -1),
|
||||
0, nullptr , wxCB_READONLY);
|
||||
|
||||
int i=0;
|
||||
for (wxBitmap* bmp : icons) {
|
||||
if (i==0) {
|
||||
c_editor->Append(_L("default"), *bmp);
|
||||
++i;
|
||||
}
|
||||
int def_id = get_default_extruder_idx ? get_default_extruder_idx() : 0;
|
||||
c_editor->Append(_L("default"), def_id < 0 ? wxNullBitmap : *icons[def_id]);
|
||||
for (size_t i = 0; i < icons.size(); i++)
|
||||
c_editor->Append(wxString::Format("%d", i+1), *icons[i]);
|
||||
|
||||
c_editor->Append(wxString::Format("%d", i), *bmp);
|
||||
++i;
|
||||
}
|
||||
c_editor->SetSelection(atoi(data.GetText().c_str()));
|
||||
|
||||
// to avoid event propagation to other sidebar items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue