mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-22 08:42:46 -05:00
Syncing the filament list from AMS with the "Overwriting" option displayed the AMS filaments in the wrong (reversed) order in the preview, even though the filament mapping that was actually applied was correct. Reported on macOS with a Bambu X1C. The preview depends on MaterialHash being iterated in material-index order. MaterialHash is a WX_DECLARE_HASH_MAP, which under OrcaSlicer's current wxWidgets 3.3 build (wxUSE_STD_CONTAINERS=1) resolves to std::unordered_map; its iteration order is unspecified and on macOS (libc++) comes out reversed, which scrambled the preview. The same code is unaffected in BambuStudio because its older wxWidgets build still uses wx's own key-ordered hash table, so this only became visible after the wx upgrade. Fixes #14335