mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: avoid invalid gcode when id is duplicated
Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Ia710f4423d0c95ff24e4c73d4a0aee19543feed4
This commit is contained in:
parent
ef06dfc931
commit
a29507dfa3
1 changed files with 2 additions and 2 deletions
|
@ -1541,8 +1541,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
std::sort(m_label_objects_ids.begin(), m_label_objects_ids.end());
|
||||
|
||||
std::string objects_id_list = "; model label id: ";
|
||||
for (size_t id : m_label_objects_ids)
|
||||
objects_id_list += (std::to_string(id) + (id != m_label_objects_ids.back() ? "," : "\n"));
|
||||
for (auto it = m_label_objects_ids.begin(); it != m_label_objects_ids.end(); it++)
|
||||
objects_id_list += (std::to_string(*it) + (it != m_label_objects_ids.end() - 1 ? "," : "\n"));
|
||||
file.writeln(objects_id_list);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue