render the G-code preview upright (designed view) + toggle UI

This commit is contained in:
harrierpigeon
2026-06-23 00:14:17 -05:00
parent bf6cce1f40
commit ddbee84e68
7 changed files with 104 additions and 43 deletions
+11
View File
@@ -351,6 +351,17 @@ void Preview::reload_print(bool only_gcode)
m_only_gcode = only_gcode;
}
void Preview::refresh_belt_view()
{
// Re-run the G-code preview conversion so the belt "designed view" toggle takes effect
// (the back-transform is baked into the toolpath geometry in GCodeViewer::load_as_gcode,
// and belt printers are exempt from the same-result-id load cache so the re-convert runs).
// Reset m_loaded_print to bypass the "already loaded" guard the way reload_print does, but
// keep the current layer (Z) range and only-gcode mode so the view doesn't jump on toggle.
m_loaded_print = nullptr;
load_print(true /*keep_z_range*/, m_only_gcode);
}
//BBS: always load shell at preview
void Preview::load_shells(const Print& print, bool force_previewing)
{