mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
FIX: [STUDIO-1500] add/remove in preset combobox
Change-Id: I8bc59798863da6b8efe64881efb443ad2dfa787d (cherry picked from commit 43164c163573f63812abf9967c53ec6b4d12b10f)
This commit is contained in:
parent
c0ccb733dd
commit
0f4db753f1
1 changed files with 15 additions and 14 deletions
|
@ -751,17 +751,18 @@ void PlaterPresetComboBox::OnSelect(wxCommandEvent &evt)
|
||||||
evt.StopPropagation();
|
evt.StopPropagation();
|
||||||
if (marker == LABEL_ITEM_MARKER)
|
if (marker == LABEL_ITEM_MARKER)
|
||||||
return;
|
return;
|
||||||
if (marker == LABEL_ITEM_WIZARD_PRINTERS)
|
//if (marker == LABEL_ITEM_WIZARD_PRINTERS)
|
||||||
show_add_menu();
|
// show_add_menu();
|
||||||
else {
|
//else {
|
||||||
ConfigWizard::StartPage sp = ConfigWizard::SP_WELCOME;
|
ConfigWizard::StartPage sp = ConfigWizard::SP_WELCOME;
|
||||||
switch (marker) {
|
switch (marker) {
|
||||||
|
case LABEL_ITEM_WIZARD_PRINTERS: sp = ConfigWizard::SP_PRINTERS; break;
|
||||||
case LABEL_ITEM_WIZARD_FILAMENTS: sp = ConfigWizard::SP_FILAMENTS; break;
|
case LABEL_ITEM_WIZARD_FILAMENTS: sp = ConfigWizard::SP_FILAMENTS; break;
|
||||||
case LABEL_ITEM_WIZARD_MATERIALS: sp = ConfigWizard::SP_MATERIALS; break;
|
case LABEL_ITEM_WIZARD_MATERIALS: sp = ConfigWizard::SP_MATERIALS; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
wxTheApp->CallAfter([sp]() { run_wizard(sp); });
|
wxTheApp->CallAfter([sp]() { run_wizard(sp); });
|
||||||
}
|
//}
|
||||||
return;
|
return;
|
||||||
} else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || m_last_selected != selected_item || m_collection->current_is_dirty()) {
|
} else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || m_last_selected != selected_item || m_collection->current_is_dirty()) {
|
||||||
m_last_selected = selected_item;
|
m_last_selected = selected_item;
|
||||||
|
@ -1074,17 +1075,17 @@ void PlaterPresetComboBox::update()
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//if (m_type == Preset::TYPE_PRINTER || m_type == Preset::TYPE_FILAMENT || m_type == Preset::TYPE_SLA_MATERIAL) {
|
if (m_type == Preset::TYPE_PRINTER || m_type == Preset::TYPE_FILAMENT || m_type == Preset::TYPE_SLA_MATERIAL) {
|
||||||
// wxBitmap* bmp = get_bmp("edit_preset_list", wide_icons, "edit_uni");
|
wxBitmap* bmp = get_bmp("edit_preset_list", wide_icons, "edit_uni");
|
||||||
// assert(bmp);
|
assert(bmp);
|
||||||
|
|
||||||
// if (m_type == Preset::TYPE_FILAMENT)
|
if (m_type == Preset::TYPE_FILAMENT)
|
||||||
// set_label_marker(Append(separator(L("Add/Remove filaments")), *bmp), LABEL_ITEM_WIZARD_FILAMENTS);
|
set_label_marker(Append(separator(L("Add/Remove filaments")), *bmp), LABEL_ITEM_WIZARD_FILAMENTS);
|
||||||
// else if (m_type == Preset::TYPE_SLA_MATERIAL)
|
else if (m_type == Preset::TYPE_SLA_MATERIAL)
|
||||||
// set_label_marker(Append(separator(L("Add/Remove materials")), *bmp), LABEL_ITEM_WIZARD_MATERIALS);
|
set_label_marker(Append(separator(L("Add/Remove materials")), *bmp), LABEL_ITEM_WIZARD_MATERIALS);
|
||||||
// else
|
else
|
||||||
// set_label_marker(Append(separator(L("Add/Remove printers")), *bmp), LABEL_ITEM_WIZARD_PRINTERS);
|
set_label_marker(Append(separator(L("Add/Remove printers")), *bmp), LABEL_ITEM_WIZARD_PRINTERS);
|
||||||
//}
|
}
|
||||||
|
|
||||||
update_selection();
|
update_selection();
|
||||||
Thaw();
|
Thaw();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue