Fix issue that gizmo grabbers stop working (#8141)

Fix issue that gizmo grabbers stop working (SoftFever/OrcaSlicer#8139)
Follow up of a66fc86e20
This commit is contained in:
Noisyfox 2025-01-22 21:50:19 +08:00 committed by GitHub
parent 06ba32e117
commit b75473482b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -143,7 +143,9 @@ void GLGizmoFlatten::set_flattening_data(const ModelObject* model_object, int in
{
if (model_object != m_old_model_object || instance_id != m_old_instance_id) {
m_planes.clear();
on_unregister_raycasters_for_picking();
if (get_state() == On) { // Only touch the raycasters if it's current
on_unregister_raycasters_for_picking();
}
}
}