merge main and fix conflicts

This commit is contained in:
Lam Wei Lun
2026-09-11 15:46:20 +08:00
12 changed files with 146 additions and 138 deletions
+15 -1
View File
@@ -5053,7 +5053,21 @@ void GLCanvas3D::do_move(const std::string& snapshot_type)
}
//BBS: notify instance updates to part plater list
m_selection.notify_instance_update(-1, 0);
// Only what moved: the selected instances, or every instance of an object one of whose
// parts moved. Notifying a plate about an instance that stayed put invalidates its slice
// result, and notifying instance 0 alone left a moved copy unregistered on its new plate.
{
std::set<std::pair<int, int>> notified;
for (unsigned int i : m_selection.get_volume_idxs()) {
const GLVolume* v = m_volumes.volumes[i];
const int object_idx = v->object_idx();
if (object_idx < 0 || object_idx >= static_cast<int>(m_model->objects.size()))
continue;
const std::pair<int, int> key(object_idx, selection_mode == Selection::Volume ? -1 : v->instance_idx());
if (notified.insert(key).second)
m_selection.notify_instance_update(key.first, key.second);
}
}
// Fixes sinking/flying instances (snaps object to buildplate)
for (const std::pair<int, int>& i : done) {