mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 15:49:01 +08:00
SPE-1920: Fixed crash while moving horizontal slider in preview
This commit is contained in:
parent
7341561ec4
commit
e26a8982da
@ -544,7 +544,7 @@ void GCodeViewer::SequentialView::GCodeWindow::render(float top, float bottom, s
|
|||||||
|
|
||||||
auto resize_range = [&](Range& range, size_t lines_count) {
|
auto resize_range = [&](Range& range, size_t lines_count) {
|
||||||
const size_t half_lines_count = lines_count / 2;
|
const size_t half_lines_count = lines_count / 2;
|
||||||
range.min = (curr_line_id >= half_lines_count) ? curr_line_id - half_lines_count : 1;
|
range.min = (curr_line_id > half_lines_count) ? curr_line_id - half_lines_count : 1;
|
||||||
range.max = *range.min + lines_count - 1;
|
range.max = *range.min + lines_count - 1;
|
||||||
size_t lines_ends_count = 0;
|
size_t lines_ends_count = 0;
|
||||||
for (const auto& le : m_lines_ends) {
|
for (const auto& le : m_lines_ends) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user