mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Fix crash when changing type of SVG / TEXT modifier (#5070)
* Fix crash when changing type of SVG / TEXT modifier
This commit is contained in:
parent
e8018008b3
commit
d163cea8f8
1 changed files with 11 additions and 2 deletions
|
@ -5025,8 +5025,17 @@ void ObjectList::change_part_type()
|
|||
}
|
||||
}
|
||||
|
||||
const wxString names[] = { _L("Part"), _L("Negative Part"), _L("Modifier"), _L("Support Blocker"), _L("Support Enforcer") };
|
||||
SingleChoiceDialog dlg(_L("Type:"), _L("Choose part type"), wxArrayString(5, names), int(type));
|
||||
// ORCA: Fix crash when changing type of svg / text modifier
|
||||
wxArrayString names;
|
||||
names.Add(_L("Part"));
|
||||
names.Add(_L("Negative Part"));
|
||||
names.Add(_L("Modifier"));
|
||||
if (!volume->is_svg() && !volume->is_text()) {
|
||||
names.Add(_L("Support Blocker"));
|
||||
names.Add(_L("Support Enforcer"));
|
||||
}
|
||||
|
||||
SingleChoiceDialog dlg(_L("Type:"), _L("Choose part type"), names, int(type));
|
||||
auto new_type = ModelVolumeType(dlg.GetSingleChoiceIndex());
|
||||
|
||||
if (new_type == type || new_type == ModelVolumeType::INVALID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue