mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: custom gcode info should be owned by every plate
Change-Id: I5e5b000b7d04354d3c3cc311d089cb591a37501e
This commit is contained in:
parent
5f71eba979
commit
e7ea07944f
16 changed files with 545 additions and 680 deletions
|
@ -4691,7 +4691,8 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
|||
}
|
||||
case EViewType::ColorPrint:
|
||||
{
|
||||
const std::vector<CustomGCode::Item>& custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
||||
//BBS: replace model custom gcode with current plate custom gcode
|
||||
const std::vector<CustomGCode::Item>& custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().get_curr_plate_custom_gcodes().gcodes : m_custom_gcode_per_print_z;
|
||||
size_t total_items = 1;
|
||||
for (size_t extruder_id : m_extruder_ids) {
|
||||
total_items += color_print_ranges(extruder_id, custom_gcode_per_print_z).size();
|
||||
|
@ -4873,7 +4874,8 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
|||
auto generate_partial_times = [this, get_used_filament_from_volume](const TimesList& times, const std::vector<double>& used_filaments) {
|
||||
PartialTimes items;
|
||||
|
||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
||||
//BBS: replace model custom gcode with current plate custom gcode
|
||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().get_curr_plate_custom_gcodes().gcodes : m_custom_gcode_per_print_z;
|
||||
std::vector<Color> last_color(m_extruders_count);
|
||||
for (size_t i = 0; i < m_extruders_count; ++i) {
|
||||
last_color[i] = m_tools.m_tool_colors[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue