Fixed import of color print view from gcode files into GCodeViewer

This commit is contained in:
enricoturri1966 2021-07-23 11:27:07 +02:00
parent 9cd61c7d0b
commit 8ebb2e2a29
10 changed files with 155 additions and 3 deletions

View file

@ -616,6 +616,10 @@ private:
GCodeProcessor::Result::SettingsIds m_settings_ids;
std::array<SequentialRangeCap, 2> m_sequential_range_caps;
#if ENABLE_FIX_IMPORTING_COLOR_PRINT_VIEW_INTO_GCODEVIEWER
std::vector<CustomGCode::Item> m_custom_gcode_per_print_z;
#endif // ENABLE_FIX_IMPORTING_COLOR_PRINT_VIEW_INTO_GCODEVIEWER
public:
GCodeViewer();
~GCodeViewer() { reset(); }
@ -665,6 +669,10 @@ public:
void stop_mapping_gcode_window();
void toggle_gcode_window_visibility() { m_sequential_view.gcode_window.toggle_visibility(); }
#if ENABLE_FIX_IMPORTING_COLOR_PRINT_VIEW_INTO_GCODEVIEWER
std::vector<CustomGCode::Item>& get_custom_gcode_per_print_z() { return m_custom_gcode_per_print_z; }
#endif // ENABLE_FIX_IMPORTING_COLOR_PRINT_VIEW_INTO_GCODEVIEWER
private:
void load_toolpaths(const GCodeProcessor::Result& gcode_result);
void load_shells(const Print& print, bool initialized);