mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-29 20:30:51 -07:00
Fix layer/time display in Preview legend for pause/custom G-code The Preview legend showed incorrect layer numbers and elapsed time for pause/custom G-code entries. The issue was caused by: • get_layer_id_at() performing a strict upper_bound search on float Z values, while custom G-code stores Z positions as doubles. Minor precision differences often pushed the lookup to return layer 0 or the last layer. • The legend displayed the raw zero-based layer index. Fixes included: • Fetch layer Z values as doubles and use an epsilon-based closest-layer search. • Display layers as 1-based values for user-facing UI. • Accumulate time up to the beginning of the identified layer. This aligns the legend with the vertical slider marker and provides consistent pause/custom G-code reporting. |
||
|---|---|---|
| .. | ||
| dev-utils | ||
| libslic3r | ||
| libvgcode | ||
| slic3r | ||
| CMakeLists.txt | ||
| OrcaSlicer.cpp | ||
| OrcaSlicer.hpp | ||
| OrcaSlicer_app_msvc.cpp | ||