mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH: support default filament for modifier
1. set modifier's initial filament index to "default" (0) 2. allow to change modifier's filament index to "default" Change-Id: I66e546e20fa5492532dd8733df5b0d38a92fd4d7 Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
This commit is contained in:
parent
6d46ac98ba
commit
05a00edb79
7 changed files with 94 additions and 17 deletions
|
@ -313,13 +313,18 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
|||
labelRect.GetTopLeft(), wxSize(labelRect.GetWidth(), -1),
|
||||
0, nullptr, wxCB_READONLY | CB_NO_DROP_ICON | CB_NO_TEXT);
|
||||
c_editor->GetDropDown().SetUseContentWidth(true);
|
||||
// BBS
|
||||
|
||||
if (has_default_extruder && has_default_extruder())
|
||||
c_editor->Append(_L("default"), *get_default_extruder_color_icon());
|
||||
|
||||
for (size_t i = 0; i < icons.size(); i++)
|
||||
c_editor->Append(wxString::Format("%d", i+1), *icons[i]);
|
||||
|
||||
c_editor->SetSelection(atoi(data.GetText().c_str()) - 1);
|
||||
if (has_default_extruder && has_default_extruder())
|
||||
c_editor->SetSelection(atoi(data.GetText().c_str()));
|
||||
else
|
||||
c_editor->SetSelection(atoi(data.GetText().c_str()) - 1);
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
c_editor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) {
|
||||
// to avoid event propagation to other sidebar items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue