FIX: auto-arranging crash for single plate arranging

Jira: STUDIO-4651

Change-Id: I8e4be997292d7f7dbd741368e20db5a0d2e693cb
(cherry picked from commit 7d75f5903f67fb332eaff4563308d5f196e45d1f)
This commit is contained in:
Arthur 2023-09-27 19:26:43 +08:00 committed by Lane.Wei
parent fe076075df
commit 8bb63ebeaf

View File

@ -163,7 +163,8 @@ public:
if (was_packed && it->get().has_tried_with_excluded) {
placers[j].clearItems([](const Item &itm) { return itm.isFixed() && !itm.is_wipe_tower; });
placers[j].preload(fixed_bins[placers.size() - 1]);
if (fixed_bins.size() >= placers.size())
placers[j].preload(fixed_bins[placers.size() - 1]);
}
bool placer_not_packed = !was_packed && !placers.empty() && j == placers.size() && placers[j - 1].getPackedSize() == 0; // large item is not placed into the bin
if (placer_not_packed) {