Fix incorrect layer and time shown in Preview legend for pause/custom G-code entries #1067

Closed
opened 2026-04-05 16:45:22 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @kisslorand on 1/15/2026

Summary

This PR fixes an issue where the Preview legend displayed the wrong layer and incorrect elapsed time for pause/custom G-code entries.
Users frequently saw layer 0, the max layer and mismatched time values, even though the vertical slider correctly marked the pause/custom G-code position.

Fix

This PR makes the legend’s behavior consistent with the slider and with user expectations:

  • Accurate layer numbers in the legend
  • Elapsed time correctly matches the slider
  • Pause/custom G-code entries always align with the visual layer marker

No changes to G-code, slicing, or core viewer functionality
This is a small, contained UI/preview fix with no side effects.

Fixes #11960

Screenshots

image
*Originally created by @kisslorand on 1/15/2026* ### Summary This PR fixes an issue where the Preview legend displayed the **wrong layer** and **incorrect elapsed time** for pause/custom G-code entries. Users frequently saw layer **0**, the **max layer** and **mismatched time values**, even though the vertical slider correctly marked the pause/custom G-code position. ### Fix This PR makes the legend’s behavior consistent with the slider and with user expectations: - Accurate layer numbers in the legend - Elapsed time correctly matches the slider - Pause/custom G-code entries always align with the visual layer marker > No changes to G-code, slicing, or core viewer functionality This is a small, contained UI/preview fix with no side effects. Fixes #11960 ### Screenshots <img width="808" height="443" alt="image" src="https://github.com/user-attachments/assets/772c2be1-a0d6-4641-8c99-a7d10a5d6a6e" />
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#1067