Fixes from Full spectrum port

https://github.com/OrcaSlicer/OrcaSlicer/pull/14383
This commit is contained in:
Ian Bassi
2026-08-23 22:11:48 +08:00
committed by SoftFever
parent 86a7e93a48
commit 42f708bbb6
14 changed files with 288 additions and 65 deletions
+8
View File
@@ -9681,6 +9681,14 @@ void GLCanvas3D::_render_paint_toolbar() const
}
}
}
// ORCA: the loop above only produces a label for a slot whose preset is found in the preset
// collection, while the render loop below iterates extruder_num (= colour count). Pad the
// label arrays so a slot without a matching preset cannot index past them — reading a garbage
// std::string here crashes in ImGui::CalcTextSize (strlen).
while (int(filament_text_first_line.size()) < extruder_num) {
filament_text_first_line.emplace_back();
filament_text_second_line.emplace_back();
}
ImGuiWrapper& imgui = *wxGetApp().imgui();
const float canvas_w = float(get_canvas_size().get_width());