From d3382b666fed0fee2067a8c30314e664fce8a8e7 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 8 Sep 2021 15:47:27 +0200 Subject: [PATCH] Fixed build on MAC --- src/libslic3r/GCode/GCodeProcessor.hpp | 6 +++--- src/slic3r/GUI/GCodeViewer.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index a1730daf2..ac0fb0d87 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -414,11 +414,11 @@ namespace Slic3r { const Vec3f position = m_result.moves.back().position; - MoveVertex& move = m_result.moves.emplace_back(m_result.moves[m_move_id.value()]); + MoveVertex& move = m_result.moves.emplace_back(m_result.moves[*m_move_id]); move.position = position; move.height = height; - m_result.moves.erase(m_result.moves.begin() + m_move_id.value()); - m_result.custom_gcode_per_print_z[m_custom_gcode_per_print_z_id.value()].print_z = position.z(); + m_result.moves.erase(m_result.moves.begin() + *m_move_id); + m_result.custom_gcode_per_print_z[*m_custom_gcode_per_print_z_id].print_z = position.z(); reset(); } diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 7e8383120..0f019b2bf 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -3045,7 +3045,7 @@ void GCodeViewer::render_legend(float& legend_height) bool imperial_units = wxGetApp().app_config->get("use_inches") == "1"; - auto append_item = [this, icon_size, percent_bar_size, &imgui, imperial_units](EItemType type, const Color& color, const std::string& label, + auto append_item = [icon_size, percent_bar_size, &imgui, imperial_units](EItemType type, const Color& color, const std::string& label, bool visible = true, const std::string& time = "", float percent = 0.0f, float max_percent = 0.0f, const std::array& offsets = { 0.0f, 0.0f, 0.0f, 0.0f }, double used_filament_m = 0.0, double used_filament_g = 0.0, std::function callback = nullptr) {