fix: persist user-selected preview view mode after first load (#13625)

fix: apply smart preview defaults per extruder count session

- Track last extruder count (1=single, 2+=multi) instead of boolean flag
- Apply appropriate default (ColorPrint/FeatureType) when count changes
- User selections persist within same extruder count
- Symmetric behavior: both single and multi actively apply defaults
- Delete duplicate dead code block (uncommented TODO scaffolding)

Behavior:
- First slice (any type) → appropriate default
- User changes view → persists on re-slice
- Switch single→single or multi→multi → persists
- Switch single↔multi → appropriate default applies
This commit is contained in:
Allyn Malventano
2026-06-16 07:15:00 -07:00
committed by GitHub
parent e6f917d7c5
commit b0c1887f40
2 changed files with 21 additions and 24 deletions

View File

@@ -226,6 +226,7 @@ private:
std::vector<libvgcode::EViewType> view_type_items;
std::vector<std::string> view_type_items_str;
int m_view_type_sel = 0;
int m_last_extruder_count_default_applied{0}; // 0=unset, 1=single, 2+=multi
std::vector<EMoveType> options_items;
bool m_legend_visible{ true };