diff options
author | bubnikv <bubnikv@gmail.com> | 2017-11-30 19:55:39 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-11-30 19:55:39 +0300 |
commit | cecaf6eabcba735837d9c631bbb79cf9b4aed6b4 (patch) | |
tree | cd1578db37cfbd361800df2f86f061ee9933c470 /xs | |
parent | a617e02ae667e49215ec577a7b0bfb9ccc2e0b3f (diff) |
Slight optimization of the filament_start_gcode insertion:
It is not needed between the purging towers and the wipe tower brim.
Diffstat (limited to 'xs')
-rw-r--r-- | xs/src/libslic3r/GCode.cpp | 7 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/PresetBundle.cpp | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 3bdc8d321..4e5f8b8fa 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -229,13 +229,6 @@ std::string WipeTowerIntegration::prime(GCode &gcodegen) // A phony move to the end position at the wipe tower. gcodegen.writer().travel_to_xy(Pointf(m_priming.end_pos.x, m_priming.end_pos.y)); gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, m_priming.end_pos)); - // Append the filament start G-code, so the linear advance value will be restored. - const std::string &start_filament_gcode = gcodegen.config().start_filament_gcode.get_at(current_extruder_id); - if (! start_filament_gcode.empty()) { - // Process the start_filament_gcode for the active filament only to restore the linear advance value. - gcode += gcodegen.placeholder_parser().process(start_filament_gcode, current_extruder_id); - check_add_eol(gcode); - } // Prepare a future wipe. gcodegen.m_wipe.path.points.clear(); // Start the wipe at the current position. diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index 29afc07cd..b216cf70a 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -556,9 +556,9 @@ static inline int hex_digit_to_int(const char c) static inline bool parse_color(const std::string &scolor, unsigned char *rgb_out) { rgb_out[0] = rgb_out[1] = rgb_out[2] = 0; - const char *c = scolor.data() + 1; if (scolor.size() != 7 || scolor.front() != '#') return false; + const char *c = scolor.data() + 1; for (size_t i = 0; i < 3; ++ i) { int digit1 = hex_digit_to_int(*c ++); int digit2 = hex_digit_to_int(*c ++); |