mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 11:56:06 +08:00
Do not show legend and bottom slider when loading an invalid gcode file into GCodeViewer
This commit is contained in:
parent
6c284882ba
commit
b00c550463
@ -991,11 +991,13 @@ void GCodeViewer::render()
|
|||||||
render_toolpaths();
|
render_toolpaths();
|
||||||
render_shells();
|
render_shells();
|
||||||
float legend_height = 0.0f;
|
float legend_height = 0.0f;
|
||||||
render_legend(legend_height);
|
if (!m_layers.empty()) {
|
||||||
if (m_sequential_view.current.last != m_sequential_view.endpoints.last) {
|
render_legend(legend_height);
|
||||||
m_sequential_view.marker.set_world_position(m_sequential_view.current_position);
|
if (m_sequential_view.current.last != m_sequential_view.endpoints.last) {
|
||||||
m_sequential_view.marker.set_world_offset(m_sequential_view.current_offset);
|
m_sequential_view.marker.set_world_position(m_sequential_view.current_position);
|
||||||
m_sequential_view.render(legend_height);
|
m_sequential_view.marker.set_world_offset(m_sequential_view.current_offset);
|
||||||
|
m_sequential_view.render(legend_height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
render_statistics();
|
render_statistics();
|
||||||
|
@ -954,7 +954,7 @@ void Preview::load_print_as_fff(bool keep_z_range)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GCodeViewer::EViewType gcode_view_type = m_canvas->get_gcode_view_preview_type();
|
GCodeViewer::EViewType gcode_view_type = m_canvas->get_gcode_view_preview_type();
|
||||||
bool gcode_preview_data_valid = !m_gcode_result->moves.empty();
|
bool gcode_preview_data_valid = !m_gcode_result->moves.empty() && !m_canvas->get_gcode_layers_zs().empty();
|
||||||
|
|
||||||
// Collect colors per extruder.
|
// Collect colors per extruder.
|
||||||
std::vector<std::string> colors;
|
std::vector<std::string> colors;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user