From 1e33b95ed71fcee14197501cabc43c6c24dbc68b Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 25 Feb 2021 08:23:45 +0100 Subject: [PATCH] Follow-up of 33aa6be7b7f3d8b81d6b948f9bd6841db10b61cf -> Validation of custom g-code added using vertical slider in preview at gcode generation level --- src/libslic3r/GCode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index f3bffe331..c7b2c8f78 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -667,6 +667,14 @@ namespace DoExport { break; } } + if (ret.size() < MAX_TAGS_COUNT) { + const CustomGCode::Info& custom_gcode_per_print_z = print.model().custom_gcode_per_print_z; + for (const auto& gcode : custom_gcode_per_print_z.gcodes) { + check(_(L("Custom G-code")), gcode.extra); + if (ret.size() == MAX_TAGS_COUNT) + break; + } + } return ret; }