mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 04:25:57 +08:00
SPE-1908: Fixed travel moves starting above the top layer not shown in preview
This commit is contained in:
parent
e1ff5feb41
commit
e8ba79a0ad
@ -2540,8 +2540,11 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool
|
||||
const size_t min_s_id = m_layers.get_range_at(min_id).first;
|
||||
const size_t max_s_id = m_layers.get_range_at(max_id).last;
|
||||
|
||||
return (min_s_id <= path.sub_paths.front().first.s_id && path.sub_paths.front().first.s_id <= max_s_id) ||
|
||||
(min_s_id <= path.sub_paths.back().last.s_id && path.sub_paths.back().last.s_id <= max_s_id);
|
||||
const bool top_layer_shown = max_id == m_layers.size() - 1;
|
||||
|
||||
return (min_s_id <= path.sub_paths.front().first.s_id && path.sub_paths.front().first.s_id <= max_s_id) || // the leading vertex is contained
|
||||
(min_s_id <= path.sub_paths.back().last.s_id && path.sub_paths.back().last.s_id <= max_s_id) || // the trailing vertex is contained
|
||||
(top_layer_shown && max_s_id < path.sub_paths.front().first.s_id); // the leading vertex is above the top layer and the top layer is shown
|
||||
};
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
Loading…
x
Reference in New Issue
Block a user